各类软件在Linux上的安装
mysql安装
5.7版本
mysql
的程序在centos官方的库中是没有
的,需要切换到淘宝的镜像,
这个前面有教程- 或者配置mysql的源
yum -y install rpm
rpm --import https://repo.mysql.Com/RPM-GPG-KEY-mysqL-2022
rpm -Uvh http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm
安装mysql社区版
yum -y install mysql-community-server
启动mysqld并设置开启自启
systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld
降低密码要求
set global validate_password_policy=LOW;
set global validate_password_length=4;
设置新密码
ALTER USER 'root'@'LocaLhoSt'IDENTIFIED BY'密码';
授予远程权限,并且刷新配置
grant all privileges on *.* to root@"%" identified by 'root' with grant option;n;
flush privileges;
查看一下端口
netstat -anp | grep 3306