網(wǎng)站建設離不開數(shù)據(jù)庫,尤其是mysql數(shù)據(jù)庫,下面介紹mysql授權(quán)遠程鏈接訪問grant和撤銷授權(quán)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