1. 程式人生 > >mysql創建新用戶並授權訪問操作該數據庫

mysql創建新用戶並授權訪問操作該數據庫

mysql



1.mysql -uroot -p

2.輸入密碼:

3.update mysql.user set authentication_string=password(‘123456‘) where user=‘oneuser‘ and Host = ‘%‘;

4.grant all privileges on onetable.* to [email protected]%‘ identified by ‘123456‘;

5.flush privileges;


然後外部連接數據庫。


mysql創建新用戶並授權訪問操作該數據庫