mysql5.7 修改密碼 遇到的問題及解決方法
阿新 • • 發佈:2019-02-03
錯誤1:
Unknown column 'Password' in 'field list'
錯誤原因:mysql資料庫下已經沒有password這個欄位了,password欄位改成了authentication_string。
mysql> update mysql.user set authentication_string=PASSWORD('password') where User='root';
Query OK, 1 row affected, 1 warning (0.15 sec)
Rows matched: 1 Changed: 1 Warnings: 1
錯誤2:
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
原因:密碼太簡單,密碼由大寫、小寫、字元、數字組成
錯誤3:
ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
原因:mysql5.7版本開始建立使用者需要create user
mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
錯誤4:
1130-host ... is not allowed to connect to this MySql server
原因:沒有開啟遠端登入
mysql>use mysql;
mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;