关于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

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理