You are not logged in.

#1 2009-04-15 01:47:54

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

PHP fails after mysql upgrade/downgrade [SOLVED]

After upgrading mysql a whole load of things got fugly.
My mod_python stop working with the databases and I had to downgrade to the previous version but now I have a new problem.
In PHP (another of the laguages I use for business) no longer wants to read the downgraded file and insists in reading the newest version of the shared files so it produces these error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613/mysql.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
Apr 14 21:26:50 dragonfly httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613/mysqli.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0

I have spent the entire day dealing with this to no avail. By now I'm pissed and frustrated,  mad so I decided to post; perhaps I'm missing something really simple.

Any help will be appreciated.

R.

Last edited by ralvez (2009-04-15 21:45:48)

Offline

#2 2009-04-15 03:12:10

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: PHP fails after mysql upgrade/downgrade [SOLVED]

When MySQL upgraded to version 5.1 I had to do the following:

(Note, you may want to try step 4 FIRST, but in my case I had to reset my root password for some reason.)

1) Stop the MySQL Daemon:

/etc/rc.d/mysqld stop

2) Restart MySQL in SAFE MODE and RESET the Root Password:

mysqld_safe --skip-grant-tables &

then do

mysql -u root mysql
UPDATE user SET password=PASSWORD('MYPWORD') WHERE User='root';
FLUSH PRIVILEGES;
exit

3) Then stop the safe Daemon and restart MySQL normally:

/etc/rc.d/mysqld restart

4) Then I had to run mysql_upgrade:

mysql_upgrade -u root -pMYPASSWORD

I think mine screwed up because I used MySQL GUI Tools which is still at version 5.0. I don't know FOR SURE, but that is my opinion.

I also had a problem initially where the "mysql.servers" table was missing. I have no idea why, but it took me a couple of hours to get everything working again. I feel your pain. But if you're brace you might try upgrading to 5.1 again and see if these instructions work for you. I had to do this on TWO machines, and it worked on both of them.

I'm also open to hear from anyone else that could explain what went on.


Matt

"It is very difficult to educate the educated."

Offline

#3 2009-04-15 11:34:25

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: PHP fails after mysql upgrade/downgrade [SOLVED]

mrunion,

Thanks for posting.
My password is not affected (your case seems like really `out there` smile )  but I have done the stopt/start about a 100 times. Re-downgraded just as many times and the problem persists... after the downgrade instead of reading libmysqlclient.so.15 it continues to read libmysqlclient.so.16

I wonder if there is a file that needs to be changed to point to the right dynamic library.

R.

Offline

#4 2009-04-15 11:38:26

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: PHP fails after mysql upgrade/downgrade [SOLVED]

Did you downgrade php, too?

Offline

#5 2009-04-15 12:59:37

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: PHP fails after mysql upgrade/downgrade [SOLVED]

And did you try just the "mysqlupgrade -u root -pMYPASSWORD" part? That reset some things for the 5.0 to 5.1 move.

I have not encountered your particular problem. I had to do two machines the way I listed, but after that PHP ran fine. I'm grasping at straws now!


Matt

"It is very difficult to educate the educated."

Offline

#6 2009-04-15 13:07:27

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: PHP fails after mysql upgrade/downgrade [SOLVED]

@Pierre,

I did not upgrade PHP only MySQL besides, in my other computer (in my office) I did not downgrade PHP and things worked out OK.

@mrunion,

I'll give the password thing a try when I get home.

Thank you both for posting.

R.

Edit: @Pierre. You know what? you gave me an idea... I'll re-install PHP perhaps things will work out after that.

Last edited by ralvez (2009-04-15 13:08:52)

Offline

#7 2009-04-15 13:10:12

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: PHP fails after mysql upgrade/downgrade [SOLVED]

Which version of php do you have installed? 5.2.9-3 needs mysql 5.1.

Offline

#8 2009-04-15 21:45:14

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: PHP fails after mysql upgrade/downgrade [SOLVED]

I have re-installed php-5.2.9-2 and now it seems to work.
Thank you all for your help.

I'm a smile camper again.

R.

Offline

Board footer

Powered by FluxBB