笑话/linux CentOS6.5 yum安装mysql 5.6
1.新开的云服务器FRjwkd,uvbW3yN需要检测系统是否自带安装mysql # yum list installed | grep mysql5H5iIJ3 9R9Fp9D 2.如果发现有系统自带mysql6Cx3jJEx,UlNA83w8lJ果断这么干 # yum -y remove mysql-libs.x86_64kqTl8c 9KeCC 3.随便在你存放文件的目录下执行l6xif58cj,YwZaB98Z2DC3H这里解释一下f33c0,LWIW7C9WIkJC由于这个mysql的yum源服务器在国外p36yVj,7AuXb所以下载速度会比较慢57Cif0c,zZWCD8IAm5还好mysql5.6只有79M大H64Cm3T4Wg1b,j1j8gsPKDU3897而mysql5.7就有182M了591f4,KE965Ue2NHe所以这是我不想安装mysql5.7的原因 # wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpmxNBJa037BmG3l 1ouNA76Ic 4.接着执行这句4R2Dh,3BOQ23N86B6解释一下A1mBk661zt5f,e827Z这个rpm还不是mysql的安装文件G2GKvliN,ieAl0tX7gM1只是两个yum源文件f9X76877fcsW10,OpdVNc执行后tajLvqW,66K8ML5nufT1h8在/etc/yum.repos.d/ 这个目录下多出mysql-community-source.repo和mysql-community.repo # rpm -ivh mysql-community-release-el6-5.noarch.rpm 5.这个时候vR5Cqff648VN,2K7nie0zws可以用yum repolist mysql这个命令查看一下是否已经有mysql可安装文件 #yum repolist all | grep mysqlW4DLaBe8th1Gc 38vyPCuS293 6.安装mysql 服务器命令(一路yes)EU7McYlR5D:23QdTm5oBaOv9 # yum install mysql-community-serverYeK49g v8UU00r7 7.安装成功后 # service mysqld startbx4V1 z9Hga 8.由于mysql刚刚安装完的时候QS4mh67nvO7ver,X9MmIdGmysql的root用户的密码默认是空的Coc755E,3d43kue17y948H所以我们需要及时用mysql的root用户登录(第一次回车键L7w1P3beRB5Y9,D4427OS5m不用输入密码)J8Xb4uUktt4dz,8Um1ZJxo6并修改密码 # mysql -u rootq4ozN8 tPK7V19BpW7wQy# use mysql;46ukQ 4vAPk7DDBfz0# update user set password=PASSWORD("这里输入root用户密码") where User='root'; # flush privileges; 9.查看mysql是否自启动7dB6IB,j413RO并且设置开启自启动命令 # chkconfig --list | grep mysqldJ1SQ88mU4f Gx8I1nr18DD6h# chkconfig mysqld ons0qq8JiXict6O 4i9P2M 10.mysql安全设置(系统会一路问你几个问题7LSBK4uf40Jk4z,pANnDg看不懂复制之后翻译689pvI,DaWV1KZd9r5AT基本上一路yes)94FReXL2x8R:2LNp38gil # mysql_secure_installationx4sWg2x1QwrOp F6b7Q 拒绝拖延ugcS5ITKr4,qv1CGN不忘初衷