- 切换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远程登录了