The remote login account that opens MySQL has two big strides:
1, make sure that the firewall on the server does not block 3306 ports.
MySQL default port is 3306, you need to determine that the firewall does not block 3306 ports, or remote can not connect through 3306 ports to MySQL.
If you specified a different port when installing MySQL, open the port number that you specified in MySQL in the firewall.
If you do not know how to set up a firewall on your server, please consult your server administrator.
2, increase allow remote connection MySQL user and authorization.
1 First login to MySQL with root account
Click the Start menu in the Windows host, run, enter "cmd", enter the console, MySQL Bin directory, and then enter the following command.
In the Linux host, enter the following command at the command prompt.
> mysql-uroot-p123456
123456 is the password for the root user.
2 Create a remote login user and authorize
> Grant all privileges on discuz.* to ted@ ' 123.123.123.123 ' identified by ' 123456 ';
The above statement indicates that all permissions to the Discuz database are authorized to the user of Ted, allowing Ted users to remotely log on to the 123.123.123.123 IP and set the TED user's password to 123456.
All of the parameters are analyzed below:
All privileges means giving all permissions to the specified user, which can also be replaced with a specific permission, such as Select,insert,update,delete,create,drop, which is separated by a "," half-width comma.
discuz.* indicates which table the above permissions are for, discuz refers to the database, and the following * means that for all tables, it is possible to infer that all tables for all databases are authorized to be "*.*" and that all tables of a database are authorized to "database name. *", A table for a database is authorized as the database name. Table name.
Ted says which user you want to authorize, this user can be a user who exists, or it can be a non-existent user.
123.123.123.123 represents an IP address that allows remote connections, or "%" if you want to not restrict the link's IP.
123456 is the user's password.
After executing the above statement, the following statement is executed before it can take effect immediately.
> Flush Privileges;