下载
wgethttps://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.30-76.3/binary/tarball/Percona-Server-5.6.30-rel76.3-Linux.x86_64.ssl101.tar.gz
2. ldd查看依赖库是否都存在
ldd /usr/local/mysql/bin/mysqld
linux-vdso.so.1 => (0x00007fff783ff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007facd19bb000)
libaio.so.1 => /lib64/libaio.so.1 (0x0000003548a00000)
libm.so.6 => /lib64/libm.so.6 (0x00007facd1736000)
librt.so.1 => /lib64/librt.so.1 (0x00007facd152e000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007facd12f7000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007facd10f2000)
libssl.so.6 => not found
libcrypto.so.6 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007facd0d5d000)
/lib64/ld-linux-x86-64.so.2 (0x00007facd1be5000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007facd0b5a000)
缺少库
yum -y install libssl.so.6 安装
find / -name "libssl.so*"
找到合适的文件。然后做软连接
ln -s /usr/lib64/libssl.so.1.0.1e /lib64/libssl.so.6
find / -name "libcrypto.so*"
找到合适的文件。然后做软连接
ln -s /usr/lib64/libcrypto.so.1.0.1e /lib64/libcrypto.so.6
rpm -qa | grep openssl
http://blog.itpub.net/29500582/viewspace-1344734/
创建mysql用户组和用户
3安装数据库
/usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/var/lib/mysql --user=mysql
4. 添加到服务中
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
添加开机启动
chkconfig --add mysqld
替换/etc/my.conf
6.service mysqld start
启动服务
/usr/local/mysql/bin/mysql_secure_installation 修改root默认密码,渠道匿名和空账号。
授权
grant all privileges on *.* to root@"%" identified by 'lph@jd';
完成安装
登录的时候提示没有安装mysql client 安装
https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.30-76.3/binary/redhat/6/x86_64/Percona-Server-shared-56-5.6.30-rel76.3.el6.x86_64.rpm
https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.30-76.3/binary/redhat/6/x86_64/Percona-Server-client-56-5.6.30-rel76.3.el6.x86_64.rpm
rpm -ivh Percona-Server-shared-55-5.5.35-rel33.0.611.rhel6.x86_64.rpm
rpm -ivh Percona-Server-client-55-5.5.35-rel33.0.611.rhel6.x86_64.rpm
error: Failed dependencies:
/usr/bin/perl is needed by MySQL-server-5.5.28-1.linux2.6.i386
yum -y install perl
7. 修改防火墙,允许访问mysql端口
#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT
#/sbin/iptables -I INPUT -p tcp --dport 3358 -j ACCEPT
然后保存:
#/etc/rc.d/init.d/iptables save
查看打开的端口:
# /etc/init.d/iptables status
-------------------------------------------------------
补充说明:
#关闭防火墙
/etc/init.d/iptables stop
service iptables stop # 停止服务
#查看防火墙信息
/etc/init.d/iptables status
#开放端口:8080
/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
#重启防火墙以便改动生效:(或者直接重启系统)
/etc/init.d/iptables restart
#将更改进行保存
/etc/rc.d/init.d/iptables save
另外直接在/etc/sysconfig/iptables中增加一行:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 8080 -j ACCEPT
#永久关闭防火墙
chkconfig –level 35 iptables off #此方法源自网络,未实验,安全考虑拒绝使用此方法