PHP 5.4 PDO could not connect to MySQL 4.1+ using the old insecure authentication

后端 未结 3 1212
遥遥无期
遥遥无期 2020-12-01 07:05

I know there are a tonne of similar questions, in fact I\'ve read all (9) of them.

However, none of them solve my problem.

I have a shared-hosting package (t

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 07:34

    In phpMyAdmin, setting the session variable will work, but the call to the password function must occur in the same session/execution.

    For example, if I execute:

    SET SESSION old_passwords = 0;
    SET PASSWORD = PASSWORD('notagoodpassword');
    

    It will correctly set it.

提交回复
热议问题