---只能本地访问,设置随意访问 update user set host='%' where host='localhost'; flush privileges; ---随意访问,设置只能本地访问 update user set host = "localhost" where user = "hello" and host= "%"; flush privileges; ---设置固定的ip可以访问 GRANT ALL PRIVILEGES ON *.* TO 'hello'@'133.22.88.77' IDENTIFIED BY 'mysql_password' WITH GRANT OPTION; flush privileges;
|