Table 'mysql.proc' doesn't exist

HitenBhavsar-MSFT 381 Reputation points Microsoft Employee
2020-05-07T21:29:17.623+00:00

Getting Table 'mysql.proc' doesn't exist when connecting from .net application to azure mysql 8.0 database. please help

[Note: As we migrate from MSDN, this question has been posted by an Azure Cloud Engineer as a frequently asked question] Source: MSDN

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
760 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Ubezzi 2,776 Reputation points
    2020-05-07T23:32:28.13+00:00

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

    UPDATE

    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;

    Source: MSDN

    0 comments No comments