CenterOS 64-bit mysql5.5.25 to open remote access function

  
 

Basic principle
After the mysql installation is successful, the default is to not open the remote access permissions, only the local can access the mysql default configuration is actually in the mysql database user table in the mysql user, only this table needs to be modified to achieve specific records associated View can refer to the figure:


Add new user authorization
1 2 #grant all privileges on *.* to create username @"%" identified by "password"; #flush privileges; #refresh just content#format: grant privilege on database name.table name to user@login host identified by &ldquoquo User password & rdquo;; #@ is followed by the client IP address (or host name) to access mysql % represents any client # If you fill localhost for local access (then this user can not remotely access the mysql database). Add shop users and enable remote access as shown in the following example
1 grant all privileges on *.* to shop@"%" identified by "shopadmin";

Set remote access for existing users
1 2 3 #use mysql; #update db set host = "%" where user = "username"; #FLUSH PRIVILEGES; #If written as host=localhost then this user does not have remote access

View modified results
1 2 #use mysql; #select host,user,password from user

Linux environment description
1, if you just need to install mysql, then only need Install the following file MySQL-serv er-5.5.25-1.rhel5MySQL-devel-5.5.25-1.rhel5MySQL-client-5.5.25-1.rhel52, if you need to build Linux implementation environment (nginx, php, mysql, tomcat, jdk, server Multi-domain configuration) Please refer to my Linux project implementation series tutorial
:CenterOS 6.3 64-bit build nginx1.3+php5.4.3+mysql5.5.25+tomcat7+jdk7 installation

Copyright © Windows knowledge All Rights Reserved