• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Help needed to upgrade mysql

K

kaiserkai

Guest
All,

i am using a 1and1 dedicated server with FC2 and Plesk 7.5.4 installed.
I am in need of upgrading mysql to 4.0.xx
After several searches of this site i decided to rather not try this on my own, not being a Linux SA but rather a guy who bought a server for some webhosting.
I have seen several offers of people to help out.

So my question is, who is willing to do it, what would it cost me (only 1 server) and do you have any references?
Please give me an idea of what I am looking at timewise as well (guessing someone who knows what he is doing can do that in about 1h)

Contact me in this threat or via PM on the boards.

Thanks in advance.
 
You do know yum will do the upgrade for you with little or no pain, right? The main thing is making sure you have the ART archive set properly and you make one small edit to your /etc/my.cnf file. Beyond that you could be running 4.1.15 (latest ART release) inside 10 mins.
 
You are correct.
I did it myself after all, and it could not have been easier.
Get Yum configured, install latest mysql through Yum, change my.conf and done.

I little shock when I couldnt connect to my databases initially but that was fixed soon.

Thanks.
 
I enabled all of the responding repositories in /etc/yum.conf

also, I added the DAG repository. My problem is there doesn't appear to be an available mysql-server to upgrade to. any ideas?

# yum search mysql-server
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Dag RPM Repository for Fedora Core
Server: Fedora Core 2 updates (from fedoralegacy.org)
Server: Fedora Core 2 - i386 - Released Updates
Server: Fedora Core 2 - i386 - Unreleased Updates
Finding updated packages
Downloading needed headers
Looking in available packages for a providing package
No packages found
Looking in installed packages for a providing package
Installed package: mysql-server.i386 0:3.23.58-16.FC2.4.legacy matches with
mysql-server
1 results returned


here's my /etc/yum.conf
# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20

[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/

[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/

[updates-testing]
name=Fedora Core $releasever - $basearch - Unreleased Updates
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/$releasever/$basearch/

#[development]
#name=Fedora Core $releasever - Development Tree
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/

[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://download.fedoralegacy.org/fedora/$releasever/os/$basearch

[fedoralegacy-updates]
name=Fedora Core $releasever updates (from fedoralegacy.org)
baseurl=http://download.fedoralegacy.org/fedora/$releasever/updates/$basearch

[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag



My ISP has Fedora Core2 installed. as well.
 
1.

# rpm -Uvh http://3es.atomicrocketturtle.com/atomic/art/2/RPMS/mysql-server-4.1.15-1.rhfc2.art.i386.rpm http://3es.atomicrocketturtle.com/atomic/art/2/RPMS/mysql-4.1.15-1.rhfc2.art.i386.rpm http://3es.atomicrocketturtle.com/atomic/art/2/RPMS/mysql-compat-4.1.15-1.rhfc2.art.i386.rpm

2.

# /usr/bin/mysql_fix_privilege_tables --user=admin --password=`cat /etc/psa/.psa.shadow`
 
Originally posted by kaiserkai
You are correct.
I did it myself after all, and it could not have been easier.
Get Yum configured, install latest mysql through Yum, change my.conf and done.

I little shock when I couldnt connect to my databases initially but that was fixed soon.

Thanks.
What did you change in my.conf? Could you please be more specific? I've already done this upgrade, but Plesk is having trouble recognizing the fact that MySQL 4.1.18 is installed. I'm starting to have a feeling that it's unsupported either by Fedora Core 2 or by Plesk, because everyone else seems to be upgrading to 4.1.15.
 
Nevermind, I figured out what the "problem" was. Wasn't a problem at all, really. Damn Plesk, lol.
 
I need to update to 4.x, but you guys are making me nervous. All this talk about problems that aren't problems.

What should I watch out for? Is there a tutorial on doing the update? When I panic, what do I do next?
 
The big thing to do is after you go to 4.1.x is edit /etc/my.cnf and add the following under [mysqld]

Code:
old_passwords=1

This prevents MySQL from trying to upgrade the passwords and breaking your system. Beyond that (I had to repair several passwords before I learned of this) I've had no problems with 4.1.15 (latest ART release)

Remember to use Yum and not a rpm!
 
I've never done anything like this. I went to the mysql website to download the upgrade, but there are like 50 different options, and the ones I think are for me all say RPM.

My server is running redhat linux on an intel celeron processor.

proc/version reports:
Linux version 2.6.5-1.358 ([email protected]) (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #1 Sat May 8 09:04:50 EDT 2004

The downloads on mysql.com all say "enterprise" (which isn't reported by proc/version), and I don't even seen an option on mysql for version 2.6.5
 
Step by step then... Please omit the # as they're just there to replace whatever your SSH prompt is.

1. Make sure Yum is installed
Code:
#which yum
If you don't go get it
http://linux.duke.edu/projects/yum/download.ptml

2. In your /etc/yum.conf file make sure you have the following
Code:
[atomic]
name=Atomic Rocket Turtle - $releasever - Atomic PSA-Compatible RPMS
baseurl=http://3es.atomicrocketturtle.com/atomic/art/$releasever/
This is where the ART files are stored

3. Now we need to check for updates (and you'll have them for certain) so we run
Code:
# yum check-update
Gathering header information file(s) from server(s)
Server: Atomic Rocket Turtle - 2 - Atomic PSA-Compatible RPMS
Server: Fedora Core 2 - i386 - Base
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Name                                Arch   Version                  Repo
--------------------------------------------------------------------------------
php-pear                            i386   4.4.2-3.rhfc2.art        atomic
php-xslt                            i386   4.4.2-3.rhfc2.art        atomic

Now the formatting is off (and your list will be 10x longer) but you get the idea. To upgrade, for instance, pear we'd use
Code:
#yum upgrade pear
Not the best example, tho, as pear is quite capable of updating itself. One of the few cases you shouldn't use an ART upgrade as this one will likely break pear.

In your case you'll want the main packages updated. I'd upgrade mysql, php and spamassassin in addition to any base packages you might need.
 
under yum check-update I get two mysql lines:

mysql i386 4.1.15-1.rhfc2.art atomic
mysql-server i386 4.1.15-1.rhfc2.art atomic

am I updating both of them?

Also, there is no my.conf in the /etc/ directory before upgrade, does the upgrade add it, or do I need to create the file manually?
 
Just run
Code:
#yum upgrade mysql
And that will be all you need

As for my.cnf... first make sure you're not searching for my.conf. It's my.cnf If it's still not there you may need to do a find
Code:
#find / -name 'my.cnf'
but I would wait until after your upgrade just in case it does move it.
 
Hello,
I need to update to MySql 4.xx too for Plesk 7.5.4 on Fedora Core 3.
I tried with Yum but my yum.conf seems to not be valid.
Do you have a yum.conf complete example for FC3 with plesk and mysql4 ?

thanks a lot, it's my first linux experience ....

edit : ok yum check-update worked, i tried yum upgrade mysql, here is the result :

yum upgrade mysql
Repository updates-released already added, not adding again
Repository base already added, not adding again
Setting up Upgrade Process
Setting up Repo: base
repomd.xml 100% |=========================| 1.1 kB 00:00
Setting up Repo: atomic
repomd.xml 100% |=========================| 951 B 00:00
Setting up Repo: updates-released
repomd.xml 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
base : ################################################## 2622/2622
atomic : ################################################## 164/164
updates-re: ################################################## 910/910
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package mysql.i386 0:4.1.15-1.rhfc3.art set to be updated
--> Running transaction check
--> Processing Dependency: libmysqlclient.so.10 for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.10 for package: mysql-server
--> Processing Dependency: mysql= 3.23.58 for package: mysql-server
--> Processing Dependency: libmysqlclient.so.10 for package: php-mysql
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package mysql-server.i386 0:4.1.15-1.rhfc3.art set to be updated
---> Package php-mysql.i386 0:4.4.2-3.rhfc3.art set to be updated
--> Running transaction check
--> Processing Dependency: php= 4.4.2-3.rhfc3.art for package: php-mysql
--> Processing Dependency: libmysqlclient.so.10 for package: perl-DBD-MySQL
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package php.i386 0:4.4.2-3.rhfc3.art set to be updated
--> Running transaction check
--> Processing Dependency: php= 4.3.11-2.7 for package: php-imap
--> Processing Dependency: php= 4.3.11-2.7 for package: php-pear
--> Processing Dependency: php= 4.3.11-2.7 for package: php-pgsql
--> Processing Dependency: php-mbstring= 4.4.2-3.rhfc3.art for package: php
--> Processing Dependency: php= 4.3.11-2.7 for package: php-domxml
--> Processing Dependency: libmysqlclient.so.10 for package: perl-DBD-MySQL
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package php-imap.i386 0:4.4.2-3.rhfc3.art set to be updated
---> Package php-pear.i386 0:4.4.2-3.rhfc3.art set to be updated
---> Package php-pgsql.i386 0:4.4.2-3.rhfc3.art set to be updated
---> Package php-mbstring.i386 0:4.4.2-3.rhfc3.art set to be installed
---> Package php-domxml.i386 0:4.4.2-3.rhfc3.art set to be updated
--> Running transaction check
--> Processing Dependency: libmysqlclient.so.10 for package: perl-DBD-MySQL
--> Finished Dependency Resolution
Error: Missing Dependency: libmysqlclient.so.10 is needed by package perl-DBD-MySQL
Should i download the libmysqlclient.so.10 for mysql 4.1.15 rpm and install it before ? I thought only YUM was necessary to make update.

Thanks.
 
I downloaded the shared rpm package but when installing it, it says it was alreay installed ...
I retried yum upgrade mysql and here is the new result :

[root@pl01 downloads]# rpm -i MySQL-shared*
attention: MySQL-shared-compat-4.1.18-0.i386.rpm: signature V3 DSA: NOKEY, key ID 5072e1f5
[root@pl01 downloads]# rpm --nosignature -ivh MySQL-shared*
Préparation... ########################################### [100%]
paquetage MySQL-shared-compat-4.1.18-0 déjÃ_ installé
[root@pl01 downloads]# cd ..
[root@pl01 /]# yum upgrade mysql
Repository updates-released already added, not adding again
Repository base already added, not adding again
Setting up Upgrade Process
Setting up Repo: base
repomd.xml 100% |=========================| 1.1 kB 00:00
Setting up Repo: atomic
repomd.xml 100% |=========================| 951 B 00:00
Setting up Repo: updates-released
repomd.xml 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
base : ################################################## 2622/2622
atomic : ################################################## 164/164
updates-re: ################################################## 910/910
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package mysql.i386 0:4.1.15-1.rhfc3.art set to be updated
--> Running transaction check
--> Processing Dependency: mysql= 3.23.58 for package: mysql-server
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package mysql-server.i386 0:4.1.15-1.rhfc3.art set to be updated
--> Running transaction check

Dependencies Resolved
Transaction Listing:
Update: mysql.i386 0:4.1.15-1.rhfc3.art

Performing the following to resolve dependencies:
Update: mysql-server.i386 0:4.1.15-1.rhfc3.art
Is this ok [y/N]: y
Downloading Packages:
mysql-4.1.15-1.rhfc3.art. 100% |=========================| 8.5 MB 00:16
mysql-server-4.1.15-1.rhf 100% |=========================| 2.4 MB 00:05
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 5ebd2744
public key not available for //var/cache/yum/atomic/packages/mysql-4.1.15-1.rhfc3.art.i386.rpm
public key not available for //var/cache/yum/atomic/packages/mysql-server-4.1.15-1.rhfc3.art.i386.rpm

What should i do to fix those public key issues please ?

thanks.
 
Run
Code:
wget [url]http://www.atomicrocketturtle.com/RPM-GPG-KEY.art.txt[/url]

And then run
Code:
rpm --import RPM-GPG-KEY.art.txt
 
Ok the upgrade is done :
Updating: mysql 100 % done 1/4
Updating: mysql-server 100 % done 2/4
Completing update for mysql - 3/4
Completing update for mysql-server - 4/4

Updated: mysql.i386 0:4.1.15-1.rhfc3.art
Dependency Updated: mysql-server.i386 0:4.1.15-1.rhfc3.art
Complete!
[root@pl01 etc]# rpm -qa|grep -i mysql
php-mysql-4.3.11-2.7
perl-DBD-MySQL-2.9003-5
mysql-server-4.1.15-1.rhfc3.art
MySQL-shared-compat-4.1.18-0
mysql-4.1.15-1.rhfc3.art
[root@pl01 etc]# vi my.cnf

I ve edited the my.cnf file to add old_passwords=1.
I tried to log into plesk and here is the result accessing the plesk admin site :

ERROR: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 0: /usr/local/psa/admin/auto_prepend/auth.php3:81 psaerror(string "Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")

edit : I ve rebooted the server and it is OK. Works fine.
Im going to make some tests.

Thanks a lot for your help.
 
awesome, I finally got up enough courage to yum update mysql -- everything here was perfect.

one question, though, phpinfo() still thinks I'm running mysql 3. It's not a big deal because command line reports the right version, and phpmyadmin is cooperating with mysql 4 commands -- but it is odd, no?
 
Hello,
Same here but i think it shows mysql client and not server.
This command will show you version of RPMs installed :
#rpm -qa|grep -i mysql
 
I am getting the following errors when I run this code in ssh: # yum upgrade mysql:
error: db4 error(-30978) from db->get: DB_RUNRECOVERY: Fatal error, run database recovery
error: error(-30978) getting "errmsg.sys" records from Basenames index
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30978) from db->get: DB_RUNRECOVERY: Fatal error, run database recovery
error: error(-30978) getting "errmsg.txt" records from Basenames index
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30978) from db->get: DB_RUNRECOVERY:
etc etc on every file..
Dep Installed: mysql-devel 4.1.18-1.rhfc2.art.i386 mysql-server 4.1.18-1.rhfc2.art.i386 mysql-compat 4.1.18-1.rhfc2.art.i386
Transaction(s) Complete


I thought I did everything listed in this thread in cluding adding the old_passwords to yum.conf but I am still getting this when I go to my Plesk control panel:

ERROR: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 0: /usr/local/psa/admin/auto_prepend/auth.php3:81 psaerror(string "Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")

Can anyone tell me what to do to correct this?
Thanks!!
 
Back
Top