创建数据库
create database discuz default character set utf8 collate utf8_general_ci;
创建用户
create user ‘discuz‘@‘localhost‘ identified by ‘discuz‘;
更改用户访问数据库的权限
grant all on discuz.* to ‘discuz‘@‘localhost‘;
更改非本机使用数据库用户连接数据库的权限的更改
update mysql.user set host=‘%‘ where host=‘localhost‘;
grant all privileges on *.* to ‘root‘@‘%‘ with grant option;
flush privileges;
时间: 2024-12-28 00:49:31