Table 'mysql.proc' doesn't exist

HitenBhavsar-MSFT 381 Reputation points Microsoft Employee

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

    I see another customer has reported the same issue on Stack Overflow: Mysql.Data and Azure Mysql error '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 " 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
    2. Update the server version in ProxySQL Connecting to ProxySQL with admin account, run the following commands.

    a. mysql –u admin –padmin -h -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