开发笔记未分类

mysql sql 新建用户 新建同用户名的数据库 并授权

sql 新建mysql用户

wordpress是用户名 wordpressa为密码 请自行替换行自己的

CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpressa';
GRANT USAGE ON *.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpressa' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
GRANT ALL PRIVILEGES ON `wordpress`.* TO 'wordpress'@'localhost';
flush privileges;
CREATE DATABASE IF NOT EXISTS `wordpress`;