- 切換root賬戶
su
或者以下shell操作sudo授權(quán)
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’
-
分配一個遠程賬戶赞季,有所有的權(quán)限缩赛。
mysql -u root -p --用剛才設(shè)置PWD本地登錄 grant all privileges on *.* to test@"%" identified by "PWD123" with grant option;
test賬戶可以通過安裝mysql的服務(wù)器IP遠程登錄了