关于centos:100centos-安装mysql

0次阅读

共计 575 个字符,预计需要花费 2 分钟才能阅读完成。

wget -i -c http://dev.mysql.com/get/mysq…
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server

systemctl start mysqld.service
查看状态:
systemctl status mysqld.service
批改 mysql 明码:
grep “password” /var/log/mysqld.log
mysql -uroot -p
ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘Rt123321#db’;
开启 mysql 的近程拜访:
grant all privileges on . to ‘root’@’%’ identified by ‘Rt123321#db’ with grant option;

flush privileges;
exit;

更改 mysql 的语言:
vi /etc/my.cnf
结尾增加内容:
[client]
default-character-set=utf8

结尾增加内容:
character-set-server=utf8
collation-server=utf8_general_ci

重启 mysql:
systemctl restart mysqld.service

正文完
 0