MySQL5.6在RHEL下用RPM包安装遇到的问题

[root@mysql56 mysql]# cat /etc/issue
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_db 
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

【问题二】:遇到 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 start
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

【问题五】:无法连接

[root@mysql56 local]# mysql
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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值