赞
踩
期待您的关注
安装大神带你安装linux版MySQL
目录
wget -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y --nogpgcheck install mysql-community-server
systemctl enable mysqld.service
systemctl start mysqld.service
systemctl status mysqld.service 等到代码前的指示灯变绿色即已经启动
grep "password" /var/log/mysqld.log
lKvikD4CyP-_
- set global validate_password_policy=0;
- set global validate_password_length=1;
alter user user() identified by "123456";
- use mysql;
-
- select host,user,authentication_string from user; --查看权限
-
- GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; --修改权限
-
- flush privileges; --刷新权限
-
- select host,user,authentication_string from user; --查看权限
因为安装了yum Repository 以后每次yum操作都会自动更新 所以需要卸载掉
yum -y remove mysql57-community-release-el7-10.noarch
- rpm -qa |grep -i mysql
-
- yum remove mysql-community mysql-community-server mysql-community-libs mysql-community-common
- find / -name mysql
- rm -rf 文件名
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。