常用mysql命令:
systemctl status mysqld
systemctl start mysqld
ststemctl enable mysqld
netstat-tunlp 、netstat-tunlp | grep msql
安装SQL:
rpm -qa |grep mysql
rpm -qa |grep mariadb
rpm -e --nodeps+软件名
mkdir /usr.local/mysql
tar -zxvf +未解压文件全名+-C /usr/local/mysql
1.rpm -ivh -[[common-libs-devel-compat-client-[yum install net-tools]-server]]
yum update
修改密码:
1.cat /var/log/mysqld.log|grep password
2.mysql -uroot -p (临时密码)
3.set global validate_password_length=4
set global validate_password_policy=LOW
set password password= password('root')
4.grant all on *.* to 'root' @'%'identifed by 'root' flush privileges
5.show databases;
6.exit