This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17076|Reply: 2

[Source] Create a remote super administrator user in mysql

[Copy link]
Posted on 6/29/2017 4:22:59 PM | | | |


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.




Previous:asp.net MVC asynchronous request form
Next:Error thrown by a dependency of object 'MySql-5.2.3' defined in 'assembly [S
 Landlord| Posted on 3/23/2018 3:04:29 PM |
Turn on remote access

In fact, it is to set the host field of root to %, which means that all IPs can connect.



The settings are fine, however, a refresh is required.


 Landlord| Posted on 3/23/2018 3:10:42 PM |
GRANT ALL PRIVILEGES ON *.* TO 'Username'@'IP' IDENTIFIED BY 'Password' WITH GRANT OPTION;
flush privileges;
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com