标签:exp HERE x86_64 code 说明 arch 改密码 log nload
下载地址:https://downloads.mysql.com/archives/community/
tar -xvf mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.17-linux-glibc2.5-x86_64 /usr/local/mysql
groupadd mysql
useradd -r -g mysql mysql
mkdir -p /data/mysql
chown mysql:mysql -R /data/mysql
vim /etc/my.cnf
进入mysql的bin目录
cd /usr/local/mysql/bin/
初始化
./mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql/ --datadir=/data/mysql/ --user=mysql --initialize
注意:如果出现报错
rpm -qa|grep libaio
yum install libaio-devel.x86_64
cat /data/mysql/mysql.err
先将mysql.server放置到/etc/init.d/mysql中
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
启动!!!
service mysql start
ps -ef|grep mysql
注意:如果出现报错
因为没有路径也没有权限,所以创建此路径并授权给mysql用户
cd /usr/local/
chown -R mysql:mysql ./mysql/
mkdir /var/log/mariadb
touch /var/log/mariadb/mariadb.log
chown -R mysql:mysql /var/log/mariadb/
解决
cd /usr/local/mysql/bin/
./mysql -u root -p
SET PASSWORD = PASSWORD(‘123456‘);
ALTER USER ‘root‘@‘localhost‘ PASSWORD EXPIRE NEVER;
FLUSH PRIVILEGES;
这里主要执行下面三个命令(先登录数据库)
use mysql
update user set host = ‘%‘ where user = ‘root‘;
FLUSH PRIVILEGES;
ln -s /usr/local/mysql/bin/mysql /usr/bin
标签:exp HERE x86_64 code 说明 arch 改密码 log nload
原文地址:https://www.cnblogs.com/gfjxyang/p/14023092.html