本文主要是介绍redhat7.1 64bit上rpm安装mysql 5.6,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
因为redhat7.1自带了mariadb的lib,所以需要先卸载:# yum remove mariadb-libs-5.5.41-2.el7_0.x86_64
安装mysql的相关rpm:
# rpm -ivh MySQL-server-5.6.23-1.el7.x86_64.rpm
# rpm -ivh MySQL-devel-5.6.23-1.el7.x86_64.rpm
# rpm -ivh MySQL-client-5.6.23-1.el7.x86_64.rpm
初始化mysql db:
# /usr/bin/mysql_install_db
为root设置密码:
# systemctl start mysql
# cat /root/.mysql_secret
# The random password set for the root user at Tue Jan 12 14:05:43 2016 (local time): D8lpRCzbcp1VszRE
[root@localhost bin]# mysql -uroot -pD8lpRCzbcp1VszRE
……
mysql> SET PASSWORD=PASSWORD('123456');
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
修改mysql db的charset为utf-8
编辑/usr/my.cnf文件,在文件末尾添加一下内容:
collation_server = utf8_general_ci
character_set_server = utf8
重启mysql:
# systemctl restart mysql
这篇关于redhat7.1 64bit上rpm安装mysql 5.6的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!