Mysql默认是不允许远程连接的,因为有很大的安全隐患。 #mysql -u root -proot mysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>select host, user from user;
# mysql -u root -proot mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'youpassword' WITH GRANT OPTION;
# mysql -u root -proot grant select,insert,update,delete on *.* to root@"202.11.10.253" Identified by "dboomysql";
# mysql -u root -proot grant all on *.* to root@"202.11.10.253" Identified by "dboomysql"
关闭mysql 1、mysql -u root -ppassword shutdown 重启Mysql 1. /etc/rc.d/init.d/mysql start 或 2。 /etc/rc.d/init.d/mysqld restart
|
|