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

2021-06-28 12:03:34 字數 453 閱讀 3181

命令如下:

mysql -u root p (這裡注意不要輸入分號;)

然後再輸入密碼

這樣root使用者就登陸成功。

然後再一次輸入下面的命令

create user 'username'@'localhost' identified by '123456';

grant all privileges on *.* to 'username'@'localhost' with grant option;

create user 'darren'@'%' identified by '123456';

grant all privileges on *.* to 'darren'@'%' with grant option;

這樣就建立了darren使用者,被賦予了遠端登陸的許可權。

MySql建立使用者並賦權

登入 mysql u root p 新建乙個資料庫 testdb create database testdb use testdb 建立t user info表 create table t user info id int 11 name varchar 64 age int 11 檢視系統使用...

oracle建立使用者並賦權

oracle建立表空間和使用者 sql view plain copy 建立表空間和使用者的步驟 使用者建立 create user 使用者名稱 identified by 密碼 授權 grant create session to 使用者名稱 grant create table to 使用者名稱...

oracle建立使用者並賦權

oracle建立表空間和使用者 sql view plain copy 建立表空間和使用者的步驟 使用者建立 create user 使用者名稱 identified by 密碼 授權 grant create session to 使用者名稱 grant create table to 使用者名稱...