I'm in the process of upgrading a server. I have chosen the latest Ubuntu LTS, 14.04 for installation on an Amazon EC2 instance. This is going well. However, upon installing phpmyadmin for db admin tasks, I see a warning:

Your PHP MySQL library version 5.5.37 differs from your MySQL server version 5.6.17. This may cause unpredictable behavior.

This is happening because my database server is an Amazon RDS instance running a different version of MySQL server than the client binaries installed on the EC2 instance.

Is this really a problem? The solutions as I see it are:
1) Ignore it, which I'm guessing will cause my heartache later when some weird problem happens that is hard to find.
2) Upgrade the server's client library (and php module) so that it uses MySQL 5.6.x. Aside from the difficulty of compiling from source, this also means that I have to manually recompile from source as bug fixes and new versions are released. I.e., I cannot rely on the Ubuntu package maintainers to keep on top of things and I'll have to do it myself. Verdict: Pain In The Ass (PITA).
3) Downgrade my RDS instance. While this is certainly much easier in the short term (literally just a matter of clicking around in a browser console), I find it sad to do so and wonder if I'll be missing any particularly effective new features.

Can anyone chime in on this? Thoughts? Advice? Etc?

    Switch to PostgreSQL?

    Question: is it depending on the deprecated MySQL extension, or is this an issue with the MySQLi extension? (I've been almost entirely in the Postgres world lately, and don't recall if phpMyAdmin has configuration options to use either extension?)

      +1 for postgres... except that RDS does not support postgres, if I remember correctly. There is an alternative postgres provider working with Amazon though.

        Please forgive me if I find the 'switch to PostGres' suggestion a little irritating as that is not the question I asked at all. Aside from the time investment I might need to adapt my code (and skills) to PostGreSQL, what guarantees do I have that Ubuntu will install a PostGreSQL driver that matches the latest available Amazon RDS instance? I'm guessing that I don't have any such guarantee. Interestingly, Ubuntu doesn't offer any detail on what pg version is supported in their package. For what it's worth, RDS does allow you to set up a PostgreSQL 9.3.3 server.

        What's kind of puzzling to me is that Ubuntu installs a mysql command line client with version 5.6.17, but the PHP functionality is for version 5.5.37 -- why are these different?

          sneakyimp wrote:

          I find it sad to do so and wonder if I'll be missing any particularly effective new features.

          From a user's perspective, one thing that jumps out at me comparing 5.6 with 5.5 is the lack in the older version of fulltext searching in innodb tables.

          But I have to admit I can't really answer any of your questions definitively (are you using the MySQLND or libmysql client library?) - I'm also using PostgreSQL (where policy is that the client can work with any server of the same or lower major version number) and I couldn't find any corresponding documentation for MySQL; and I have the luxury of not having to run it on Someone Else's Computer**™ (although even there I'd expect the client and server versions to match).

          Incidentally, MySQL 5.7 is already a year old....

            Weedpacket;11041779 wrote:

            From a user's perspective, one thing that jumps out at me comparing 5.6 with 5.5 is the lack in the older version of fulltext searching in innodb tables.

            But I have to admit I can't really answer any of your questions definitively (are you using the MySQLND or libmysql client library?) - I'm also using PostgreSQL (where policy is that the client can work with any server of the same or lower major version number) and I couldn't find any corresponding documentation for MySQL; and I have the luxury of not having to run it on Someone Else's Computer**™ (although even there I'd expect the client and server versions to match).

            Incidentally, MySQL 5.7 is already a year old....

            Thanks for the informative detail. I find it really irritating how the Ubuntu packages lag so far behind the cutting-edge development. My workstation is running PHP 5.3.10-1ubuntu3.12. On the other hand, I am still grateful to the package maintainers for making installation so easy.

            I had tried sniffing around a bit to determine the difference between MySQLND and libmysql and am not entirely sure that that difference is. This page suggests that choosing one or the other is a 'compile time decision.' I'm guessing this means that, because I'm using packages to install PHP, this decision is not up to me but rather the package installers. I've been looking around phpinfo's output to try and determine which might have been chosen but am not having much luck. I did see this key-value pair:
            MYSQL_LIBS = -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r

            There's also a credit for mysqlnd but I've noticed these credits seem to be built-in regardless of installed modules or compile time options. Interesting the Mysql credit is to Andrey Hristov, Ulf Wendel, Georg Richter, Johannes Schlüter (note the funny chars in Schluter's name).

              The issue would go away if you switch to mysqlnd, which is indeed a compile time option. Otherwise, have you tried using apt-get upgrade?

                11 days later

                I have indeed done apt-get update and apt-get upgrade. And these versions are still so old! I seem to recall Debian was always really sluggish updating to new software and I believe Ubuntu is built on Debian.

                bradgrafelman wrote:

                If you want to use the native driver, have you tried installing the php5-mysqlnd package?

                This would actually be the package that gets installed on my new server. My workstation is running the older PHP.

                I find it really irritating that package description page doesn't tell you which version of MySQL is installed! So stupid.

                I think I tried php5-mysqlnd, but my notes say it was only version 5.0 (!).

                I tried installing this but it only resulted in client version 5.0! LAME.

                sudo apt-get install php5-mysqlnd

                So I removed it:

                sudo apt-get remove  php5-mysqlnd

                I ended up rolling my db server (Amazon RDS instance) back to version 5.5 and they match now so the complaints have disappeared. Grrr.

                  4 days later
                  sneakyimp;11042103 wrote:

                  I think I tried php5-mysqlnd, but my notes say it was only version 5.0 (!).

                  mysqlnd version number is neither mysql server, mysql client version nor php version. Still, I believe you should have 5.0.11. Even php 5.3 had 5.0.6 or 5.0.7.

                  sneakyimp;11042103 wrote:

                  I ended up rolling my db server (Amazon RDS instance) back to version 5.5 and they match now so the complaints have disappeared. Grrr.

                  I still believe you should stick with mysqlnd.

                    13 days later
                    johnafm wrote:

                    mysqlnd version number is neither mysql server, mysql client version nor php version. Still, I believe you should have 5.0.11. Even php 5.3 had 5.0.6 or 5.0.7.

                    I wish I knew what this meant. I vaguely recall installing php-mysqlnd and then checking client versions (either from CLI or via phpinfo) and noticed that the client versions displayed there were quite old.

                      22 days later

                      It means that each version of a software only relates to that specific software, even when they have similar version numbering. mysqlnd version 5.0 is not specifically for mysql server 5.0, nor does it have any relation to PHP 5.0. In fact, I believe there was no mysqlnd in PHP 5.0 (but do refer to the manual for exact information on the matter).

                      In PHP 5.3, mysqlnd had version numbers 5.0.6 and 5.0.7. Currently is should (probably) be 5.0.11. In PHP 5.3 you could use mysql server 5.1. You still can. You can also use mysql server 5.6. And you do not need to change your PHP install.

                      Also note that with mysqlnd you do not need to install anything from MySQL on your web server (unless you also want to have mysql client and/or mysql server on the same machine).

                        Write a Reply...