Authentication with old password no longer supported, use 4.1 style passwords

前端 未结 9 643
孤城傲影
孤城傲影 2020-11-29 06:06

I have my website with hostgator and I want to access mysql database with C# windows application but when I tried to connect got this message:

\"Auth

9条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 06:42

    I had the same problem. In my case just ran the command below connected on my database by the Workbench:

    SET SESSION old_passwords=0;
    SET PASSWORD FOR my_user=PASSWORD('my_password');
    

    After that I could connnect using MySql Connector 6.6.5 in the c# code with the common mysql connection string:

    "server=my_server_ip;user=my_user;database=my_db;port=3306;password=my_password;"
    

提交回复
热议问题