1、mysql下載
下載地址:https://dev.mysql.com/downloads/mysql/5.6.htmlbr>下載以下安裝包:
MySQL-client-5.6.33-1.el6.x86_64.rpm
MySQL-devel-5.6.33-1.el6.x86_64.rpm
MySQL-server-5.6.33-1.el6.x86_64.rpm
2、查看是否已經(jīng)安裝了mysql,有則移除
rpm -qa|grep -i mysql
mysql-libs-5.1.66-2.el6_3.x86_64
yum -y remove mysql-libs*
3、安裝mysql5.6
rpm -ivh MySQL-client-5.6.33-1.el6.x86_64.rpm
rpm -ivh MySQL-devel-5.6.33-1.el6.x86_64.rpm
rpm -ivh MySQL-server-5.6.33-1.el6.x86_64.rpm
cp /usr/share/mysql/my-default.cnf /etc/my.cn
4、初始化MySQL及設(shè)置密碼
/usr/bin/mysql_install_db
service mysql start
cat /root/.mysql_secret
mysql -uroot -p初始密碼
set PASSWORD=PASSWORD('123456');
exit
5、開啟遠(yuǎn)程訪問
mysql -uroot -p123456
use mysql;
update user set password=password('123456') where user='root';
update user set host='%' where user='root' and host='localhost';
flush privileges;
exit
6、設(shè)置開機(jī)自啟動(dòng)
7、優(yōu)化my.cnf配置
vim /etc/my.cnf
[mysqld]
port = 3306
default-storage-engine = InnoDB
lower_case_table_names = 1
max-connections=3000
character_set_server=utf8
[mysql]
default-character-set=utf8
以上所述是小編給大家介紹的CentOS6.5下RPM方式安裝mysql5.6.33的詳細(xì)教程,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
您可能感興趣的文章:- CentOS下使用yum命令安裝計(jì)劃任務(wù)程序crontab的方法
- Centos 7下利用crontab定時(shí)執(zhí)行任務(wù)詳解
- CentOS下采用Crontab實(shí)現(xiàn)PHP腳本定時(shí)任務(wù)
- Centos系統(tǒng)中用mock構(gòu)建rpm的方法
- centos7 用rpm安裝mysql詳解
- Centos中徹底刪除Mysql(rpm、yum安裝的情況)
- 詳解使用rpm命令從CentOS系統(tǒng)盤安裝計(jì)劃任務(wù)程序crontab