MySQL5.6在RHEL下用RPM包安装遇到的问题
2014-12-02 14:28
405 查看
[root@mysql56 mysql]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m
WARNING: The host 'mysql56' could not be looked up with /usr/bin/resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
解决方法:修改/etc/hosts
[root@mysql56 mysql]# hostname
mysql56
[root@mysql56 mysql]# vi /etc/hosts
192.168.114.13 mysql56
。。。。。。。。。。。
Installing MySQL system tables...2014-12-02 09:49:56 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
。。。。。。。。。。。
解决方法:加上参数 --explicit_defaults_for_timestamp,如下:
[root@mysql56 mysql56]# /usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql56 --explicit_defaults_for_timestamp
。。。。。。。。
2014-12-02 10:39:11 8892 [Note] RSA private key file not found: /var/lib/mysql56//private_key.pem. Some authentication plugins will not work.
2014-12-02 10:39:11 8892 [Note] RSA public key file not found: /var/lib/mysql56//public_key.pem. Some authentication plugins will not work.
。。。。。。。。
解决过程:
[root@mysql56 lib]#rpm -qa openssl
openssl-1.0.1e-15.el6.x86_64
[root@mysql56 lib]# openssl genrsa -out mykey.pem 1024
Generating RSA private key, 1024 bit long modulus
.....++++++
......++++++
e is 65537 (0x10001)
[root@mysql56 lib]# openssl rsa -in mykey.pem -pubout > mykey.pub
writing RSA key
[root@mysql56 lib]# chmod 440 mykey.pem
[root@mysql56 lib]# chmod 444 mykey.pub
[root@mysql56 lib]# chown mysql:mysql mykey.pem
[root@mysql56 lib]# chown mysql:mysql mykey.pub
[root@mysql56 lib]# vi /etc/my.cnf
[mysqld]
sha256_password_private_key_path=/var/lib/mykey.pem
sha256_password_public_key_path=/var/lib/mykey.pub
Starting MySQL..... ERROR! The server quit without updating PID file (/var/lib/mysql/mysql56.pid).
解决办法:
由于安装的时候指定了datadir: --datadir=/var/lib/mysql56 ,而/etc/my.cnf中未指定,在启动时,在默位置查找,
添加后问题解决
[root@mysql56 lib]# vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql56
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
解决办法:
由于未使用默认的datadir造成的,修改[mysql]下的socket,如下:
[root@mysql56 lib]# vi /etc/my.cnf
[mysql]
socket = /var/lib/mysql56/mysql.sock
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m
【问题一】遇到could not be looked up with /usr/bin/resolveip
[root@mysql56 soft]# /usr/bin/mysql_install_dbWARNING: The host 'mysql56' could not be looked up with /usr/bin/resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
解决方法:修改/etc/hosts
[root@mysql56 mysql]# hostname
mysql56
[root@mysql56 mysql]# vi /etc/hosts
192.168.114.13 mysql56
【问题二】:遇到 TIMESTAMP with implicit DEFAULT value is deprecated.
[root@mysql56 mysql56]# /usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql56。。。。。。。。。。。
Installing MySQL system tables...2014-12-02 09:49:56 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
。。。。。。。。。。。
解决方法:加上参数 --explicit_defaults_for_timestamp,如下:
[root@mysql56 mysql56]# /usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql56 --explicit_defaults_for_timestamp
【问题三】:遇到rsa问题
[root@mysql56 mysql56]# /usr/bin/mysql_install_db --user=mysql --datadir=/var/lib/mysql56 --explicit_defaults_for_timestamp。。。。。。。。
2014-12-02 10:39:11 8892 [Note] RSA private key file not found: /var/lib/mysql56//private_key.pem. Some authentication plugins will not work.
2014-12-02 10:39:11 8892 [Note] RSA public key file not found: /var/lib/mysql56//public_key.pem. Some authentication plugins will not work.
。。。。。。。。
解决过程:
[root@mysql56 lib]#rpm -qa openssl
openssl-1.0.1e-15.el6.x86_64
[root@mysql56 lib]# openssl genrsa -out mykey.pem 1024
Generating RSA private key, 1024 bit long modulus
.....++++++
......++++++
e is 65537 (0x10001)
[root@mysql56 lib]# openssl rsa -in mykey.pem -pubout > mykey.pub
writing RSA key
[root@mysql56 lib]# chmod 440 mykey.pem
[root@mysql56 lib]# chmod 444 mykey.pub
[root@mysql56 lib]# chown mysql:mysql mykey.pem
[root@mysql56 lib]# chown mysql:mysql mykey.pub
[root@mysql56 lib]# vi /etc/my.cnf
[mysqld]
sha256_password_private_key_path=/var/lib/mykey.pem
sha256_password_public_key_path=/var/lib/mykey.pub
【问题四】:安装完成后无法启动:
[root@mysql56 mysql56]# service mysql startStarting MySQL..... ERROR! The server quit without updating PID file (/var/lib/mysql/mysql56.pid).
解决办法:
由于安装的时候指定了datadir: --datadir=/var/lib/mysql56 ,而/etc/my.cnf中未指定,在启动时,在默位置查找,
添加后问题解决
[root@mysql56 lib]# vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql56
【问题五】:无法连接
[root@mysql56 local]# mysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
解决办法:
由于未使用默认的datadir造成的,修改[mysql]下的socket,如下:
[root@mysql56 lib]# vi /etc/my.cnf
[mysql]
socket = /var/lib/mysql56/mysql.sock
相关文章推荐
- linux下rpm方式安装mysql5.6及问题解决
- win8.1安装mysql5.6时遇到问题解决方案
- 安装mysql5.6(MySQL-5.6.27-1.linux_glibc2.5.x86_64.rpm-bundle.tar)遇到的问题
- CentOS 7 安装 MySQL 5.6遇到的各种问题小结
- 安装mysql5.6遇到的问题
- 解决用rpm安装mysql时遇到系统库没有安装的问题
- win8.1安装mysql5.6时遇到问题解决方案
- RHEL5.7 64位源码编译安装mysql-5.5.42遇到的问题
- CentOS 7 安装MySQL 5.6遇到问题及解决方案
- mysql(rpm包)更改安装路径问题
- 用RPM包安装MySQL的默认安装路径问题
- RHEL5.3-WEB-linux+apache+mysql+php搭建论坛 (全rpm包安装)
- centos 安装mysql中遇到问题的解决办法
- Debian 服务器下MySQL重新安装遇到的问题
- Linux下安装mysql遇到的一些问题及解决办法
- linux下安装LAMP-----mysql遇到问题总结
- RedHat 9.0下用rpm包安装mysql的问题
- 编译安装mysql的过程遇到的问题
- rhel 5.2 用rpm安装apache+mysql+cacti