MySQL PHP incompatibility

后端 未结 10 1824
天涯浪人
天涯浪人 2020-11-28 07:42

I\'m running WAMP locally, but connecting to a remote MySQL database. The local version of PHP is the latest 5.3.0.

One of the remote databases, being version 5.0.45

10条回答
  •  [愿得一人]
    2020-11-28 08:26

    Your database server is set to use old passwords by default. The error message you get is mysqlnd seeing a database that can support the new (safer) authentication but refuses to do so. In such a case, mysqlnd aborts the connection and refuses to work.

    Make sure your my.cnf does not have

    old-passwords = 1 
    

    After you comment out that setting from my.cnf (or remove it from where else it might be set), and restart your server, make sure to re-set your password using the command VolkerK describes, otherwise you won't be able to log in.

提交回复
热议问题