Home  >  Article  >  Database  >  RedHat 6/CentOS 6下部署MySQL 5.6时遇到的一些问题

RedHat 6/CentOS 6下部署MySQL 5.6时遇到的一些问题

WBOY
WBOYOriginal
2016-06-07 17:33:221006browse

RedHat 6/CentOS 6下部署MySQL 5.6时遇到的一些问题及解决

RedHat 6/CentOS 6下部署MySQL 5.6时遇到的一些问题及解决

1、先查看是否已经有安装旧版的mysql,使用以下命令 rpm  -qa | grep  mysql

2、删除已经存在的mysql,使用以下命令 yum -y remove mysql-xxx

3 我使用的是mysql-5.6.14-linux-glibc2.5-x86_64.tar这样的解压就能用的包,懒得用编译的,太麻烦。所以一般解压到/usr/local/mysql目录下

4 mysql5.6跟之前的版本有了一些变化,在support-files文件夹没有以前那么多的配置模板了,而且mysql 5.0/5.1的配置文件不能直接copy过来就用,必须拷贝support-files/my.cnf或support-files/my-new.cnf到/etc/my.cnf,否则在启动mysql时会报出一大堆像:/usr/sbin/mysqld: unknown option '--skip-locking'或Starting MySQL............The server quit without updating PID file (/var/lib/mysql/XXX.pid).这样的错

5 在mysql5.1的时候可以这样添加用户insert into user (Host,User,Password) values ("localhost","xxx",PASSWORD("123456"));,但在5.6似乎不行了,,会报:Field 'ssl_cipher' doesn't have a default value

只能先使用create user xxx创建用户,然后使用update user set password=password('123456') where user='xx';

6 mysql 5.6的my.cnf不再识别default-character-set=utf8' 这样的配置了,如果想统一设置编码,只需要在/etc/my.cnf的[mysqld]下加上character_set_server=utf8和character_set_client=utf8

推荐阅读:

Ubuntu下Nginx做负载实现高性能WEB服务器5---MySQL主主同步

生产环境MySQL主主同步主键冲突处理

MySQL主从失败 错误Got fatal error 1236

MySQL主从复制,单台服务器上实施

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn