一忙芒,下載源:
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-linux-glibc2.5-x86_64.tar
wget http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.7/mysql-5.7.12-linux-glibc2.5-x86_64.tar
二:安裝依賴庫:
yum install -y? gcc-c++ ncurses-devel perl-Data-Dumperpython-devel openssl openssl-devel
三藤乙,安裝:
tar -xvf mysql-5.7.12-linux-glibc2.5-x86_64.tar -C /opt/
cd /opt
tar -zxvf mysql-5.7.12-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.12-linux-glibc2.5-x86_64 mysql
cd mysql
cp bin/my* /usr/bin
mysqld --initialize --user=mysql --basedir=/opt/mysql --datadir=/export/mysql/data
mysql_ssl_rsa_setup --datadir=/export/mysql/data
/opt/mysql/bin/mysqld_safe --defaults-file=/etc/mysql/my.cnf --user=mysql &
查看mysql err log纺铭,找到root的原始化密碼,用root賬號(hào)登陸
登陸后界轩,修改root 賬號(hào)密碼:set password=password('xxxxx');