首页 > 数据库 > MySQL > 正文

CentOS6.5下RPM方式安装mysql5.6.33的详细教程

2024-07-24 13:10:54
字体:
来源:转载
供稿:网友

1、mysql下载

下载地址:https://dev.mysql.com/downloads/mysql/5.6.html<br>下载以下安装包:

MySQL-client-5.6.33-1.el6.x86_64.rpmMySQL-devel-5.6.33-1.el6.x86_64.rpmMySQL-server-5.6.33-1.el6.x86_64.rpm

2、查看是否已经安装了mysql,有则移除

rpm -qa|grep -i mysqlmysql-libs-5.1.66-2.el6_3.x86_64yum -y remove mysql-libs*

3、安装mysql5.6

rpm -ivh MySQL-client-5.6.33-1.el6.x86_64.rpmrpm -ivh MySQL-devel-5.6.33-1.el6.x86_64.rpmrpm -ivh MySQL-server-5.6.33-1.el6.x86_64.rpmcp /usr/share/mysql/my-default.cnf /etc/my.cn

4、初始化MySQL及设置密码

/usr/bin/mysql_install_dbservice mysql startcat /root/.mysql_secretmysql -uroot -p初始密码set PASSWORD=PASSWORD('123456');exit

5、开启远程访问

mysql -uroot -p123456use mysql;update user set password=password('123456') where user='root';update user set host='%' where user='root' and host='localhost';flush privileges;exit

6、设置开机自启动

chkconfig mysql on

7、优化my.cnf配置

vim /etc/my.cnf[mysqld]port = 3306default-storage-engine = InnoDB lower_case_table_names = 1 max-connections=3000character_set_server=utf8[mysql] default-character-set=utf8

以上所述是小编给大家介绍的CentOS6.5下RPM方式安装mysql5.6.33的详细教程,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对VeVb武林网网站的支持!


注:相关教程知识阅读请移步到MYSQL教程频道。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表