after Linux installs MySQL database, connect MySQL times by remote erro 2003:can ' t connect to MySQL server on ' *.***.*** ' (111), the workaround is as follows:
1.[[email protected] ~]# mysql-u root p #登陆mysql
2.mysql> Grant all privileges on * * to ' root ' @ '% ' indentified by ' Beauty ' with GRANT option;
3. Mysql> FLUSH Privileges
4. Mysql> quit
5.all privileges means giving all permissions to the specified user, which can also be replaced by assigning a specific permission, such as Select,insert,update,delete,create,drop,
The specific permissions are separated by a comma, half-width. discuz.* indicates which table the above permissions are for, discuz refers to the database, and the following * represents all tables, which can
Inference: All tables for all databases are authorized as "*. *" and all tables in a database are authorized as "database name. *", for a table of a database is authorized as "database name. Table Name".
This article is from the "Fly Higher" blog, make sure to keep this source http://vqiao.blog.51cto.com/9368913/1622459
Centos6.5 Modify MySQL remote login