給MySQL新建使用者名稱密碼
阿新 • • 發佈:2018-11-12
1、cmd 進入mysql 安裝目錄下
2、使用root使用者登入資料 mysql -uroot -p
E:\mysql-5.6.14-winx64\bin>mysql -uroot -p
3、建立使用者
create user'使用者名稱'@'localhost'identified by '密碼';
4、給予許可權 GRANT ALL ON *.* TO 'rsm'@'%'; grant all on *.* to 'jsyl'@'localhost'; grant all privileges on *.* to 'root'@'%' identified by 'root'; (%) 表示所有ip
執行完上述命令後用下面的命令重新整理許可權
flush privileges; 5、退出,檢驗,新使用者重新登陸 E:\mysql-5.6.14-winx64\bin>mysql -ujsyl -p
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 36
4、給予許可權 GRANT ALL ON *.* TO 'rsm'@'%'; grant all on *.* to 'jsyl'@'localhost'; grant all privileges on *.* to 'root'@'%' identified by 'root'; (%) 表示所有ip
執行完上述命令後用下面的命令重新整理許可權
flush privileges; 5、退出,檢驗,新使用者重新登陸 E:\mysql-5.6.14-winx64\bin>mysql -ujsyl -p
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 36