Absrtact: Today installed on the Linux server MSYQL database, in the local access can be accessed, but I would like to access the remote way when it is not accessible, query data found that Linux under the default installation of MySQL is only local access permissions, no remote access permissions, You need to set access permissions for the specified user to access the database remotely, let me take a look at the following:
One: Log in to the MySQL database after installation, such as:
Two: Enter the command line to set permissions for the root user and enter, such as:
Here root for the root user, the last root represents the root user's password, I here user name, password is root, the middle of the% number for all IP address can be remote access, if you want to open remote access to a machine, then the% to which machine IP address, This is the only machine that can access the MySQL database under Linux remotely.
Mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' root '; Mysql>flush Privileges
<textarea spellcheck="false" tabindex="0"></textarea>
Xxxxxxxxxx
2 1
on ' root' @ '%' by' root ';
2
Mysql>flush Privileges
Remote access permission to open MySQL database under Linux