yum安装方式:
1、下载相应版本的rpm文件;
2、安装下载的rpm文件:
sudo rpm -Uvh platform-and-version-specific-package-name.rpm
例如:sudo rpm -Uvh MySQL57-community-release-el6-n.noarch.rpm
3、选择相应的版本:
yum repolist all | grep mysql;
yum repolist enabled | grep mysql;
4、安装mysql
sudo yum install mysql-community-server
5、启动与查看mysql服务:
sudo service mysqld start;
sudo service mysqld status;
6、修改root密码:
mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
mysql服务启动
service mysqld start;
mysql服务停止
service mysqld stop;
mysql服务重启
service mysqld restart;
新闻热点
疑难解答