mysql遠端登入授權

2021-08-04 14:09:15 字數 365 閱讀 2930

mysql為了安全性,在預設情況下使用者只允許在本地登入,可是在有此情況下,還是需要使用使用者進行遠端連線,因此為了使其可以遠端需要進行如下操作:

允許root使用者在任何地方進行遠端登入,並具有所有庫任何操作許可權,

具體操作如下:

在本機先使用root使用者登入

mysql

: mysql -u root -p"youpassword"

進行授權操作:

mysql>grant all privileges on *.* to 'root'@'%' identified by 'youpassword' with grant option;

過載授權表:

flush privileges;

mysql 遠端登入並授權

建立遠端登陸使用者並授權 grant all privileges on discuz.to ted 123.123.123.123 identified by 123456 上面的語句表示將 discuz 資料庫的所有許可權授權給 ted 這個使用者,允許 ted 使用者在 123.123.123...

mysql修改 密碼及授權遠端登入

1 法一 mysql u root mysql set password for root localhost password newpass 2 法二 用update直接編輯user表 mysql u root mysql use mysql mysql update user set pass...

MySQL允許遠端登入的授權方法

泛授權方式 資料庫本地直接登入上資料庫 mysql h localhost u root 然後執行以下命令,授權完後直接就可以遠端連線上。mysql grant all privileges on to root with grant option 賦予任何主機上以root身份訪問資料的許可權 my...