时间:2021-07-01 10:21:17 帮助过:10人阅读
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
tar -xvf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
mv mysql-5.7.22-linux-glibc2.12-x86_64 /usr/local/
mv /usr/local/mysql-5.7.22-linux-glibc2.12-x86_64 /usr/local/mysql
mkdir /usr/local/mysql/data
groupadd mysql
useradd mysql -g mysql
chown -R mysql.mysql /usr/local/mysql
/usr/local/mysql/bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data
2018-07-14 06:40:32 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2018-07-14 06:40:32 [ERROR] Child process: /usr/local/mysql/bin/mysqldterminated prematurely with errno= 32
2018-07-14 06:40:32 [ERROR] Failed to execute /usr/local/mysql/bin/mysqld --bootstrap -->datadir=/usr/local/mysql/data --lc-messages-dir=/usr/local/mysql/share --lc-messages=en_US -->basedir=/usr/local/mysql
-- server log begin ---- server log end --
/usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data --initialize
/usr/local/mysql/bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
yum -y install numactl
/usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data --initialize
[mysqld]
datadir=/usr/local/mysql/data
basedir=/usr/local/mysql
socket=/tmp/mysql.sock
user=mysql
port=3306
character-set-server=utf8取消密码验证
skip-grant-tables
#Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0#skip-grant-tables
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
chkconfig mysql on
service mysql start
/usr/local/mysql/bin/mysql -u root -p
>use mysql;
>update user set authentication_string=password(‘你的密码‘) where user=‘root‘;
>flush privileges;
>exit;
/usr/local/mysql/bin/mysql -u root -p
>ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘修改后的密码‘;
>exit;
/usr/local/mysql/bin/mysql -u root -p
>use mysql;
>update user set host=‘%‘ where user = ‘root‘;
>flush privileges;
>eixt;
ln -s /usr/local/mysql/bin/mysql /usr/bin
linux 安装mysql 5.7
标签:term proc cannot roc character 连接 .gz flush The