迁移mysql数据库,运行项目的时候发现nginx和uWSGI都配置正确,可就是网站打不开,看了log文件,发现错误: django.db.utils.OperationalError: (1044, "Access denied for user 'lcp'@'%' to database 'work_blog'") 看到这意识到mysql数据库现在只有root账户,并没lcp这个.所以需要增加这个用户,并设置密码和相应权限,下面是一个通用命令: mysql -u root -p C…
postgres 创建新用户并授权 https://blog.csdn.net/XuHang666/article/details/81506297 原作者总结的挺好的 可以用来学习一下. grant all on database hcmcloud(databasename) to hcm(username) postgres 默认用户是postgres,为超级用户. 第一步:先以postgress 登录 1)psql -U '用户名' 2.)创建数据库新用户 CREATE USER 用户…
mysql -uroot -proot MySQL5.7 mysql.user表没有password字段改 authentication_string: 一. 创建用户: 命令:CREATE USER 'username'@'host' IDENTIFIED BY 'password'; 例子: CREATE USER 'dog'@'localhost' IDENTIFIED BY '123456'; CREATE USER 'dog2'@'localhost' IDENTIFIED BY ''…
mysql -uroot -proot MySQL5.7 mysql.user表没有password字段改 authentication_string: 一. 创建用户: 命令:CREATE USER 'username'@'host' IDENTIFIED BY 'password'; 例子: CREATE USER 'dog'@'localhost' IDENTIFIED BY '123456'; CREATE USER 'dog2'@'localhost' IDENTIFIED BY ''…
mysql -uroot -proot 例子: 创建用户mysql> CREATE USER 'xiaoyaoji'@'%' IDENTIFIED BY 'xiaoyaoji';Query OK, 0 rows affected (0.00 sec)查看权限mysql> show grants for 'xiaoyaoji'@'%';+---------------------------------------+| Grants for xiaoyaoji@% |+-------------…
mysql -uroot -proot MySQL5.7 mysql.user表没有password字段改 authentication_string: 一. 创建用户: 命令:CREATE USER 'username'@'host' IDENTIFIED BY 'password'; 例子: CREATE USER 'dog'@'localhost' IDENTIFIED BY '123456'; CREATE USER 'dog2'@'localhost' IDENTIFIED BY ''…