- 切換root賬戶
su
或者以下shell操作sudo授權
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-server
mysqladmin -u root password 'PWD’
-
分配一個遠程賬戶,有所有的權限。
mysql -u root -p --用剛才設置PWD本地登錄 grant all privileges on *.* to test@"%" identified by "PWD123" with grant option;
test賬戶可以通過安裝mysql的服務器IP遠程登錄了