Linux Redhat 4.4.7 安裝 8.0.13 MySQL Community Server
阿新 • • 發佈:2018-11-03
1.剛開始安裝mysql參考這個:
https://blog.csdn.net/a116475939/article/details/74625377
2.修改密碼
mysql> use mysql; #先把密碼置為空字串;(不讓後面修改密碼會報錯) mysql> update user set authentication_string="" where user="root"; #這個重新整理非常有必要;不讓後面執行alter就會出錯 mysql> flush privileges; mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密碼';
3.建立使用者以及賦權
mysql> create user 'shenbo'@'%' identified by '$mima...'; Query OK, 0 rows affected (0.21 sec) mysql> grant all privileges on *.* to 'shenbo'@'%' ; Query OK, 0 rows affected (0.06 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00sec)