Upgraded mysql to 5.6 from 5.1, but php info still shows client version 5.1

Evnironment: centos6.6 using virtualmin sh install all, originally php is PHP version 5.3.3, mysql 5.1.72, but I want to upgrade mysql to 5.6, so I uninstall mysql and install 5.6 using these commands

# yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
# yum install mysql mysql-devel mysql-server mysql-utilities

      

initially

mysql-5.1.73-3.el6_5.x86_64
php-mysql-5.3.3-40.el6_6.x86_64
mysql-community-release-el6-5.noarch
mysql-devel-5.1.73-3.el6_5.x86_64
mysql-libs-5.1.73-3.el6_5.x86_64
mysql-server-5.1.73-3.el6_5.x86_64

      

Now

mysql-connector-python-2.0.2-1.el6.noarch
mysql-community-release-el6-5.noarch
mysql-community-devel-5.6.22-2.el6.x86_64
mysql-community-libs-5.6.22-2.el6.x86_64
mysql-community-server-5.6.22-2.el6.x86_64
mysql-community-common-5.6.22-2.el6.x86_64
mysql-utilities-1.5.3-1.el6.noarch
php-mysql-5.3.3-40.el6_6.x86_64
mysql-community-libs-compat-5.6.22-2.el6.x86_64
mysql-community-client-5.6.22-2.el6.x86_64

      

php info here

MySQL

Client API version 5.1.72

MySQLi

API Client Library version 5.1.72

What am I missing, does anyone know?

OTHER INFORMATION

removed mysql5.6 again

[root@centos1 modules]# ls
curl.so      imap.so      pdo_odbc.so    pgsql.so    wddx.so       xsl.so
dom.so       json.so      pdo_pgsql.so   phar.so     xmlreader.so  zip.so
fileinfo.so  mbstring.so  pdo.so         snmp.so     xmlrpc.so
gd.so        odbc.so      pdo_sqlite.so  sqlite3.so  xmlwriter.so

      

after reinstalling mysql5.6

[root@centos1 modules]# ls
curl.so      json.so      pdo_mysql.so   pgsql.so    xmlreader.so
dom.so       mbstring.so  pdo_odbc.so    phar.so     xmlrpc.so
fileinfo.so  mysqli.so    pdo_pgsql.so   snmp.so     xmlwriter.so
gd.so        mysql.so     pdo.so         sqlite3.so  xsl.so
imap.so      odbc.so      pdo_sqlite.so  wddx.so     zip.so

[root@centos1 mysql]# ls
libmysqlclient.a        libmysqlclient_r.so.16.0.0  libmysqlclient.so.16      libmysqlservices.a
libmysqlclient_r.a      libmysqlclient_r.so.18      libmysqlclient.so.16.0.0  plugin
libmysqlclient_r.so     libmysqlclient_r.so.18.1.0  libmysqlclient.so.18
libmysqlclient_r.so.16  libmysqlclient.so           libmysqlclient.so.18.1.0

      

+3


source to share


4 answers


i removed php-mysql and used mysql-nd instead of webtatic repo



0


source


php-mysql use libmysql. and maybe your mysql-libs are not up to date.

answer for author answer

php-mysql make extension module mysql.so (maybe find / usr / lib 64 / php)

mysql.so link libmysqlclient.so.16



libmysqlclient.so.16 is the client lib for mysql 5.1 and I think this file is not being removed.

maybe libmysqlclient find / usr / lib 64 / mysql and install another mysql version you can see another libmysqlclient version.

backup libmysqlclient.so.16 and copy the other version to libmysqlclient.so.16.

maybe it works. but does not guarantee that it works well.

0


source


Do yourself a great favor and

1) Reboot

2) Check your logs; make sure the mysql daemon starts after reboot (and make sure it is the mysql daemon you expect)

... AND FINALLY ...

3) Make sure you have one - and only one - mysql installed.

For example:

yum list installed | grep -i mysql

mysql.x86_64                        5.1.69-1.el6_4                     installed
mysql-bench.x86_64                  5.1.69-1.el6_4                     installed
mysql-connector-odbc.x86_64         5.1.5r1144-7.el6                   installed
mysql-devel.x86_64                  5.1.69-1.el6_4                     installed
mysql-libs.x86_64                   5.1.69-1.el6_4                     installed
mysql-server.x86_64                 5.1.69-1.el6_4                     installed
perl-DBD-MySQL.x86_64               4.013-3.el6                        installed
php-mysql.x86_64                    5.3.3-23.el6_4                     installed

      

0


source


It might have something to do with it, displaying 5.1 for the client version.

Redhat maintains a software collections repository offered downstream for CentOS 6.x.

It contains more recent versions of MySQL, PHP, etc. than the versions contained in the standard distribution. The newest versions are fully supported, but the notes say that the new MySQL version (5.5) is expected to use the MySQL client (5.1) from the standard distribution, even if the 5.5 client is installed along with the 5.5 daemon.

When you installed 5.6 from the mysql repo, it installed packages with a different naming scheme than the main packages:
Old: mysql-server-5.1.73-3.el6_5.x86_64 (mysql-server-xxx)
New: mysql-community-server- 5.6.22-2.el6.x86_64 (mysql-community-server-xxx)

To replace the old version, you must install:
mysql-server-5.6.22-2.el6.x86_64 (not mysql-community-server ...)

This way the main MySQL client can still be there and the system is configured to use the main MySQL client even with a newer version of the server.

Red Hat Software Collections 1.0 Release Notes, 1.4. Known Issues

1.4. Known issues
...
mariadb, mysql, postgresql

The Red Hat software collections contain MySQL 5.5, MariaDB 5.5, and PostgreSQL 9.2. The Red Hat Enterprise Linux 6 kernel provides earlier versions of these databases (client library and daemon). Client libraries are also used in database connectors for dynamic languages, libraries, etc.

The client libraries packaged in the Red Hat Software Collections database packages should not be used as they are included for the purpose of the server utilities and daemon only. Instead, users are expected to use the system libraries and database connectors with the host system.

The protocol that is used between the client library and the daemon is a stable version of the database, so using , for example, MySQL 5.1 client library with the MySQL 5.5 daemon works as expected.

CentOS Documentation: Software Collections Repository (SCL)

0


source







All Articles