Azure MySQL 8 wrong server version

Category: azure database for mysql

Question

henningploegerzeb on Tue, 28 Jan 2020 16:00:06


The query of the servers version yields the wrong version number, so that some application e.g. Drupal could not be used. 

$link=mysqli_connect(...);
echo mysqli_get_server_info($link);
5.6.42.0

Are there any workarounds? Where do I file a bug report? 

Kind regards


Replies

NavtejSaini-MSFT on Thu, 30 Jan 2020 14:05:59


Hi

We can do the bug report on your behalf. Please provide the exact steps that you followed when you encountered this. We will re produce the issue and file a bug report with concerned Product team.

Please let us know if you have any questions.

Thanks
Navtej S

NavtejSaini-MSFT on Tue, 04 Feb 2020 22:15:22


Hi 

I have checked the version for Mysql8.0 and it is giving correct information. Please provide repro steps for your scenario.

Thanks
Navtej S

NavtejSaini-MSFT on Fri, 07 Feb 2020 16:30:17


Hi 

If you are still facing this issue, please get back to us and we can work on it to resolve the issue.

Thanks
Navtej S

Bradley Grainger (Faithlife) on Fri, 27 Mar 2020 03:48:34


This looks like a duplicate of an issue I reported a long time ago: https://social.msdn.microsoft.com/Forums/en-US/795cb2be-dce7-4805-b324-a67e83697580/azure-database-for-mysql-reports-incorrect-version?forum=AzureDatabaseforMySQL

 Because your client initially connects to a proxy, it will report the version of the proxy, which isn't the same as the underlying Azure Database for MySQL server.

To get the true version, execute "SELECT version();" once you're connected.

Mike Ubezzi (Azure) on Mon, 04 May 2020 20:46:10


Bradley,

Thank you for providing the insight. I want to provide the solution that is being presented by the Product Group.

I see another customer has reported the same issue on Stack nbsp;Mysql.Data and Azure Mysql error 'Table 'mysql.proc' doesn't exist'

And this was reported in another MSDN thread: Table 'mysql.proc' doesn't exist

ISSUE: You are getting the below error because when you start a connection to Azure MySQL, the gateway of Azure MySQL will first send back a greeting package with a default server version "5.6.42.0 MySQL Community Server (GPL)". This make the MySQL.Data driver treat the server version as 5.6. But actually it is 8.0 and in MySQL 8.0, the table mysql.proc not exists anymore.

Workaround: You can use ProxySQL to fix the version issue:

  1. Set up ProxySQL for Azure MySQL https://techcommunity.microsoft.com/t5/Azure-Database-for-MySQL/Load-balance-read-replicas-using-ProxySQL-in-Azure-Database-for/ba-p/880042

  2. Update the server version in ProxySQL Connecting to ProxySQL with admin account, run the following commands.

a. mysql –u admin –padmin -h 127.0.0.1 -P 6032

b. UPDATE global_variables SET variable_value='' WHERE variable_name='mysql-server_version';

c. load mysql variables to runtime;

d. save mysql variable to disk;

Please let me know if you have additional questions about this.

Regards,

Mike