网站建设离不开数据库,尤其是mysql数据库,下面介绍mysql授权远程链接访问grant和撤销授权revoke
GRANT ALL PRIVILEGES ON mytable.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
revoke ALL PRIVILEGES ON mytable.* from 'myuser'@'%' IDENTIFIED BY 'mypassword' ;
FLUSH PRIVILEGES;
注意远程lianjie连接mysql时,需要开放响应端口,默认3306