直接按步骤安装
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# wget
# rpm -ivh mysql-community-release-el6-5.noarch.rpm
[root@localhost ~]
# yum repolist all | grep mysql 查看一下是否已经有mysql可安装文件
mysql-connectors-community MySQL Connectors Community enabled: 36
mysql-connectors-community-
source
MySQL Connectors Community - So disabled
mysql-tools-community MySQL Tools Community enabled: 47
mysql-tools-community-
source
MySQL Tools Community - Source disabled
mysql55-community MySQL 5.5 Community Server disabled
mysql55-community-
source
MySQL 5.5 Community Server - So disabled
mysql56-community MySQL 5.6 Community Server enabled: 358
mysql56-community-
source
MySQL 5.6 Community Server - So disabled
mysql57-community-dmr MySQL 5.7 Community Server Deve disabled
mysql57-community-dmr-
source
MySQL 5.7 Community Server Deve disabled
|
yum 安装即可
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
[root@localhost ~]
# yum install mysql-community-server -y
安装成功后
# service mysqld start
设置root密码
# mysql -u root
# use mysql;
# update user set password=PASSWORD("这里输入root用户密码") where User='root';
# flush privileges;
mysql安全设置
# mysql_secure_installation
设置开启自启动命令
# chkconfig mysqld on
|
本文转自 jackjiaxiong 51CTO博客,原文链接:http://blog.51cto.com/xiangcun168/1928907