System Environment: Linux CentOS-6.4-64bit
During the MySQL setup process, the default Root account can only be accessed from the local machine. If you want to access the MySQL database on Linux through other machines, you must make some configuration, next I will introduce my solutions. First, use the Root account to enter MySQL from the command line, and then configure it as follows:
1. The following statement grants access permissions to the corresponding account. Fill in the required 'username' and 'Password' sections
Grant all privileges on *. * to 'username '@' % 'identified by 'Password' with grant option;
2. Write Permission
Flush privileges;
3. Restart the database
Service mysqld restart
When the network is running, I find that the MySQL database in Linux cannot be remotely connected after the above configuration. Later, I found out that the firewall was at fault. There are still two solutions: one is to add Port 3306 in the configuration file, and the other is to close the firewall directly, currently, I use the second method to directly disable the firewall. Next, I open the terminal and enter setup. The following interface will appear:
Press enter to enter the following page:
Use the Space key to select whether to enable the connection. After I disable the function, connect to the remote client and find that the connection is now available. The problem has been solved successfully.
Recommended reading:
Linux website architecture series-Apache-deployment
Complete MySQL installation and master-slave dual-machine configuration
Install MySQL database in rpm mode on RHEL6 Platform
RedHat 6.3 MySQL-server-5.6.13-1.el6.x86_64.rpm Installation
Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04