标签:回车 word ble 启动mysql mon height arc 单机安装 size
第一步:查看mysql是否安装.
rpm -qa|grep mysql
第二步:卸载 mysql
yum remove mysql mysql-server mysql-libs mysql-common
rm -rf /var/lib/mysql
rm /etc/my.cnf
第三步:安装mysql.
下载mysql的官方 yum respository
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
安装 yum respository
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum安装mysql
yum -y install mysql-community-server
第四步: mysql 设置
首先启动mysql
systemctl start mysqld.service
查看mysql状态
systemctl status mysqld.service
在日志文件中找出密码:
grep "password" /var/log/mysqld.log
进入数据库:
mysql -uroot -p # 回车后会提示输入密码
修改密码
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘root‘;
MySQL完整的初始密码规则可以通过如下命令查看:
mysql> SHOW VARIABLES LIKE ‘validate_password%‘;
修改密码规则
set global validate_password_policy=0;
set global validate_password_length=1;
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘root’;
卸载 yum respository
yum -y remove mysql57-community-release-el7-10.noarch
标签:回车 word ble 启动mysql mon height arc 单机安装 size
原文地址:https://www.cnblogs.com/yuanpeng-java/p/9552682.html