本文共 1073 字,大约阅读时间需要 3 分钟。
cd /usr/local/src
wget http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.31-linux-glibc2.5-x86_64.tar.gz tar zxvf mysql-5.6.29-linux-glibc2.5-x86_64.tar.gz mv mysql-5.6.29-linux-glibc2.5-x86_64 /usr/local/mysql useradd -s /sbin/nologin mysql cd /usr/local/mysql mkdir -p /data/mysql ; chown -R mysql:mysql /data/mysql ./scripts/mysql_install_db --user=mysql --datadir=/data/mysql cp support-files/my-default.cnf /etc/my.cnf cp support-files/mysql.server /etc/init.d/mysqld chmod 755 /etc/init.d/mysqld vim /etc/init.d/mysqld #修改datadir chkconfig --add mysqld chkconfig mysqld on service mysqld start 错误:yum install -y libaio
ERROR 2002 (HY000): Can't connect to local MySQLserver through socket '/var/lib/mysql/mysql.sock' (2)
这里要检查这里
cp support-files/my-default.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld chmod 755 /etc/init.d/mysqld vim /etc/init.d/mysqld #修改datadir//添加path路径
export PATH=$PATH:/usr/local/mysql/bin/
#vi ~/.bash_profile
PATH=/usr/local/mysql/bin:$PATH:$HOME/bin
本文转自 15816815732 51CTO博客,原文链接:http://blog.51cto.com/68686789/1832228
转载地址:http://iywzo.baihongyu.com/