View Full Version : mySQL3-->4 upgrade experiences (not so good)

02-04-2005, 07:46 AM
I see 3 possible scenarios:

1. Everyone was smarter than I, and is waiting to upgrade mySQL
2. Everyone, like me, did the upgrade, and is still busy dealing with the aftermath
3. I am the only one who had problems

So, I thought I'd share what happened. The instructions posted my WH appeared straight-forward, so I dove in, first upgrading PHPmyAdmin, to 2.6.0. I was not able to access it, so after playing with the settings in the config script, I finally got in (had to change the auth_type to cookie from config, as well as some user and password tweaks).

I was then able to backup my databases to a single file, which I thought was pretty cool. I then unisntalled mySQL3 and installed mySQL4. Now I couldn't access mysql OR PHPmyAdmin. After several hours of playing with it, I realized that although mySQL installed, it did not create the mysql database, making it impossible to login to either app (I could get into mysql with no password, but couldn't actually DO anything - other than see the databases, which did not exist). I reinstalled 2x, and the mysql database finally got installed, and I could now log into phpmyadmin. I thought my troubles were over.

I imported the file to recreate the databases, but it failed on the mysql database, so I had to do some cut/paste to get the rest in there. Since I wanted my old users back, without having to recreate them by hand, and I realized that mysql had changed the format of the tables so I couldn't insert the data I had, I just deleted all of the tables in the mysql database while logged into phpmyadmin. I wasn't sure how big a mistake it was, but I was then able to restore the original mysql database tables from the script. Of course, it then had a problem with the mismatch of the tables with the new version. Luckily mysql dealt with this, and had a script, mysql_fix_privilege_tables, which I had to copy, and make changes to before I could get it to run. For some reason it did not like the --no-defaults option that the script tacked onto the mysql command it used to log into mysql. I figured out the mysql command line arguments that it would accept, and modified accordingly. The tables were converted, and my sites were finally back online.

I am certainly interested to know if anyone else followed WH instructions and were 100% successful. I certainly was not, so hopefully others can avoid the problems that I had. I could probably sit down and figure out a step-by-step for the procedure I ended up following, if it would help anyone.


02-04-2005, 07:48 AM
Oh, BTW, phpBB 2.0.11 will not install now. Site App just tells me it failed with no reason. I'm not too concerned about that right now, as I don't really use it, but might try it again after I upgrade PHP.

02-05-2005, 05:50 PM
Tried it, but couldn't get into mysql at all. Mysql didn't want to let me in with the password I'd given during the install. Tried no password as well, just in case, but same result. Followed the WH instructions but I'm now guessing there's a problem with this upgrade. Ended up going back to the previous version to get my site working again.

Anyone else manage to get success?

02-06-2005, 01:41 AM
Not a smooth process.

First, I updated phpMyAdmin and then uninstalled both php and MySQL.
I installed MySQL first, then I installed php.

phpMyAdmin said MySQL would not accept my password. I tried different ones and tryied hard-codeing the username and password into the config file.
I checked the "my.cnf" file and the password was correct.
I reinstalled phpMyAdmin, but it didnt help.

I looked for MySQL files but some seemed to be missing.
So, I uninstalled MySQL and reinstalled it again.

Now, I was able to log into phpMyAdmin.
I had backed up all of my databases via the shell using WH instructions.
I used phpMyAdmin to restore it, unfortuneatly MySQL kept giving an error at the beginning of the file.
I edited the file to remove the part that was giving the error and I also removed the data in the file for the mysql and sphera databases.
I uploaded the sql file again. IT WORKED. I had all of my databases back.

I changed the password and username in my db apps and tried them out. They all worked.

My phpBB works without being uninstalled/reinstalled. I dont know why WH says to reinstall it.

A few tips.
1. If mySQL doesnt install correctly the first time (or if phpMyAdmin cant access mySQL) uninstall and reinstall mySQL seems to work.
2. The password you supply in the mySQL wizard is for the "root" user. If your scripts use another username you may have to change it to "root".
3. phpMyAdmin is installed in a different location. There is a link to it in the Site Manager.
4. phpMyAdmin uses your normal site login username and password (mine does anyway) so it should not be affected by mySQL password changes.
5. When you import your databases, if there is an error phpMyAdmin will show you the problem line. If you can, edit the line and try again.

02-06-2005, 06:34 AM
timecode, try reinstalling mysql4 several times. I think it took me two or 3 reinstalls before the user database showed up, which is where the password is stored. That is probably why you can't get in. That's what happened to me.


02-06-2005, 06:12 PM
The php MySQL client API version is 3.23.49!
And I installed MySQL4 first.

The client API version was 3.23.54 in php with mySQL 3.

I tryed reinstalling php but the client API version still doesnt match the installed mySQL version.

I just noticed, no Zend Optimizer.
Comparing my new and old phpinfo pages, they both have the Zend logo but the new one is missing the Zend configuration info.
Is anyone else missing the Zend Optimizer?
If Zend is not installed, I wonder if I can install it myself?

02-07-2005, 10:52 AM
You can install the Zend Optimizer yourself. Just download the optimizer from zend.com and upload it to your server. I put mine in /usr/local/ and unzip it. There is already a Zend directory that is root owned so I renamed my newly unzipped directory to Zend2. If you try to run the install script it will say that you need to be root to run it so I just opened up the install script and commented out the 6 or 7 lines where it is checking to see if you are running as root, and then I ran the install script again and it works fine.

02-08-2005, 01:15 PM
i saw in a different thread that someone had a question about the process...here are the lines I commented out in install.sh:

#if [ ! -z "$MYUID" ];
# if [ $MYUID != 0 ];
# then
# error "You need root privileges to run this script!";
# fi

and to anwer the other question, the Zend install automatically rewrites the necessary lines in the php.ini file so php will know where to find it. Then to restart apache just type "restart" from the command line or do it from the Site Manager.

02-08-2005, 09:22 PM

Thanks - worked real good.

A couple of notes:

I will assume that you have named the directory Zend2 as above. When you install put it into Zend2 (Zend will not work).

After you install you will find that safe_mode is on (doesn't matter what you do with php.ini). The way I got out of it was to uninstall PHP 4.3.10 and reinstall it. Then I copied the php.ini from /usr/local/Zend2/etc/php.ini to /ftp/usr/lib/php.ini ... sucess. Finally got the

Zend Technologies with Zend Optimizer v2.5.7

BTW: My cart seems to be a lot faster.

02-10-2005, 03:13 AM
I spent several hours with a very similar experience. Uninstalling/Reinstalling mysql, trying to loging to mysql as root user.

Finally figured out that I needed to first upgrade PHP from 4.3.0 to 4.3.10 before the install script for MYSQL 4.1.9 would create the user tables.

After upgrading PHP the install worked immediatly and I could reimport my data back into the appropriate tables.

Hope this helps somebody out there.