乐趣区

关于centos:100centos-安装mysql

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

退出移动版