当前位置:Gxlcms > 数据库问题 > 阿里云CentOS安装mysql5.7

阿里云CentOS安装mysql5.7

时间:2021-07-01 10:21:17 帮助过:4人阅读

‘ WITH GRANT OPTION;

对某个数据库,为某个用户授权:

create user ‘dev_fast‘@‘%‘ identified by ‘******‘;

grant all on fastadmin.* to ‘dev_fast‘@‘%‘;

 

修改root密码:

alter user ‘root‘@‘localhost‘ identified by ‘******‘;

update user set authentication_string=password(‘******‘) where user=‘root‘ and Host=‘%‘;

flush privileges;

8. 修改默认编码

修改/etc/my.cnf配置文件,在[mysqld]下添加编码配置:

character_set_server=utf8

init_connect=‘SET NAMES utf8‘

9.重启mysql

重启:systemctl restart mysqld

 

默认配置文件路径: 
配置文件:/etc/my.cnf 
日志文件:/var/log//var/log/mysqld.log 
服务启动脚本:/usr/lib/systemd/system/mysqld.service 
socket文件:/var/run/mysqld/mysqld.pid

 

阿里云CentOS安装mysql5.7

标签:图片   gre   ges   HERE   password   文件   dmi   The   nic   

人气教程排行