一马平川
不积跬步无以至千里,后继才能薄发

Centos的mysql安装

2020年03月02日
0
未分类

Centos 的mysql安装

下载
1
wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
安装 mysql 源
1
2
yum localinstall mysql57-community-release-el7-11.noarch.rpm
yum repolist enabled | grep "mysql.*-community.*" //检查 mysql 源是否安装成功
安装 MySQL
1
yum install -y mysql-community-server
启动Mysql服务
1
2
systemctl start mysqld
systemctl enable mysqld //开机启动
获取初始密码,登录
1
2
cat /var/log/mysqld.log | grep root
mysql -uroot -p
修改root密码
1
2
set global validate_password_policy=0; //设置密码策略为简单
alter user 'root'@'localhost' identified by 'Ching1569'
授权远程访问
1
2
3
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
service mysqld restart
小内存机器mysql内存调优

mysql内存调优

如果喜欢这篇文章,可以给作者评个份哦~

原文声明: "转载本站文章请注明作者和出处Nothinglin ,请勿用于任何商业用途"

公众号:苦逼的学生仔