Disclaimer, I operate with mysql version 5.5.20, please test other versions!
(Since MySQL 5.7, the password has been called authentication_string)
First, we log in to the database with root privileges, and then use mysql;
Execute the following sentence:
Found and reported an error as follows:
ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value Explanation on the Internet:
Add user insert into mysql.user(Host,User,Password) values("localhost","test",password("1234"));
Report the following error ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value error
mysql 5.1 or above, I am operating on version 5.6.
Reasons for misstatement:
Some fields in the mysql user table cannot be empty, there is no default value, in fact, it is an operation error, mysql adding users cannot directly insert the user table like this. Workaround:
This adds a new user and there will be no above errors.
|