I have a problem after upgrading my openSuSE 11.0 from the build repositories given on this website.
During upgrade with smart apache, php5 and mysql have been updated. Now “select version();” on mysql shows “5.1.46-log” which was expected. “php -r ‘print mysql_get_client_info();’” on the other hand shows “5.0.51a” which was the mysql version before update.
I checked libmysqlclient in /usr/lib64. There are libmysqlclient.16.0.0 and libmysqlclient.15.0.0. “mysql.so” still uses libmysqlclient.15.0.0, but should use v.16 after being updated. Changing symbolic links v.15 to point to v.16 result in error messages from “mysql.so”.
I really don’t know where the problem is. Any hints?
Thanks in advance.
P.S.: phpMyAdmin shows two new databases: “#mysql50.log#” and ‘#mysql50.tmp#’ which cannot be deleted. How can I get rid of these?
If the PHP mysql module was updated, did you restart Apache so that PHP will be using the latest module? The old mysql.so may be hardwired to require the .15 API. You should also check the version of mod_apache-php5.
Those “databases” are probably stray files in /var/lib/mysql and not databases. You can remove them from that directory after carefully checking that they really are log and temp files respectively.
Version of apache2-mod_php5 is 5.3.2-23.3. Seems this is the latest available.
I even rebooted the machine, but with no success. Apache logs do not show anything unusual after restart.
Those strange “databases” now “disappeared”. Seems these were my .logs and .tmp folders which I placed in the same directory as the database folders. Now these “databases” are called “.logs” and “.tmp”. I only wonder why these folders appear as databases now because in the former version folders starting with a dot did not appear in the database list of phpMyAdmin.
So I’m still stuck with the wrong mysql client version in php5. ldd shows that mysql.so in /usr/lib64/php5/extensions relies on libmysqlclient.so.15. But I think it should be libmysqlclient.so.16 after having updated. So maybe the rpm package was not ok?
Find out what package that dynamic object comes from:
rpm -qf /usr/lib64/php5/extensions/mysql.so
Should be php5-mysql followed by a version number. If the package is the wrong version, then you have to update that package also. It’s not just PHP, but also its extensions that have to be updated.
As for the “databases”, it’s the MySQL server that thinks that they are databases, phpMyAdmin just queries it. It could be that previously mysqld ignored dot directories. You shouldn’t leave any stray directories there anyway.
Okay, one down. mysql_upgrade renamed my “.logs” and “.tmp” to “@002elogs” and “@002etmp”. These folders appeared as “.logs” and “.tmp” in phpMyAdmin. Renaming them back to “.logs” and “.tmp” makes phpMyAdmin show them as “#Mysql50#.logs” and “#Mysql50#.tmp”. Changed my.cnf so that these directories are not need any longer, restarted mysql and removed the folders.
smart info /usr/lib64/php5/extensions/mysql.so shows
It could still be that the latest mysql.so requires the .15 client library so you will have to have both .15 and .16 versions installed. The version updates of mysql and PHP may not be in step.
Well, as I wrote before “ldd” shows that “mysql.so” depends on “libmysqlclient.so.15”. If this is because “mysql.so” has not yet been updated to work with “libmysqlclient.so.16” that’s fine.
I thought that my installation might be corrupt after the update. Is there any source of information to confirm that “mysql.so” will come with one of the next updates working with “libmysqlclient.so.16”?
You have to look at the dependency list in the RPM SPEC file. It’s up to the maintainer.
There was probably a good reason for this. The maintainer probably didn’t want to force people to update two major software suites at once. So probably there will be a .15 version for compatibility, sometime down the track a .16 version will appear and very much later when old MySQL versions are dead, the .15 module will be dropped. Perhaps not for years, since DBs tend to run a long time.