catalog
- Download MySQL
- install
- Configure Mysql to allow remote access
Download MySQL
Download address: http://dev.mysql.com/downloads/mysql
I download the installation version here
install
Configure Mysql to allow remote access
- Enter MySQL:
/usr/local/mysql/bin/mysql -u root -p - Use MySQL Library:
use mysql; - To view the user table:
SELECT Host,User FROM user;
- Update user table:
UPDATE user SET Host = '%' WHERE User = 'root' LIMIT 1;
%If you need to specify a specific IP address, you can write a specific IP address
Because the user table above has changed the name of the root user with the address of localhost% to%, you can no longer use the localhost address to log in locally, but you can use the address of 127.0.0.1. - Force refresh permission:
flush privileges;