mysql 授權使用者登陸 mysql授權登入使用者

2021-10-17 20:25:27 字數 636 閱讀 1639

建立使用者並授權

create user 'voctrals'@'%' identified by 'some_password';

允許遠端訪問

grant all privileges on *.* to 'voctrals'@'%' identified by 'some_password' with grant option;

如果想要這個使用者本地也能夠訪問的話,需要額外執行:

grant all privileges on *.* to 'voctrals'@'localhost' identified by 'some_password' with grant option;

提交特權

flush privileges;

授權了使用者之後還是不能夠遠端登陸的話,可以去伺服器的 /etc/mysql/conf.d 檔案下注釋掉

host_address = 127.0.0.1

或bind-address = 127.0.0.1

mysql my.cnf

lower_case_table_names=1

character-set-server=utf8

mysql 5.7

mysql error 1698 (28000) 錯誤

mysql授權root使用者遠端登陸許可權

提示意思是不能用grant建立使用者,mysql8.0以前的版本可以使用grant在授權的時候隱式的建立使用者,8.0以後已經不支援,所以必須先建立使用者,然後再授權,命令如下 mysql create user root identified by hadoop3 query ok,0 rows ...

mysql建立遠端登陸使用者並授權

在建立安裝微擎的過程中,針對第四步 建立遠端登陸使用者並授權 grant all privileges on database.toroot 127.0.0.1 identified by 123456 上面的語句表示將 database 資料庫的所有許可權授權給 root 這個使用者,允許 roo...

掃碼授權登陸

手機授權掃碼登陸 首先輸入賬號密碼,進行驗證,驗證成功後顯示手機授權 這個是掃碼授權的 實現 var numt var token var t1 function getcode numt 0 t1 setinterval surestuts,3000 定時狀態確認 確認手機授權情況 functio...