简体   繁体   English

如何授予 mysql 用户在 ubuntu 上创建和删除数据库的权限

[英]How to give a mysql user permission to create and delete database on ubuntu

i recently migrated to aws from shared hosting, as i was using php application i chose to use mysql as db.我最近从共享主机迁移到 aws,因为我正在使用 php 应用程序,我选择使用 mysql 作为数据库。

However i was hosting 3 web applications on 1 ec2 instance, i had to create 3 DB's and 3 User's giving them appropriate fill privilege to their respective DB.但是,我在 1 个 ec2 实例上托管 3 个 web 应用程序,我必须创建 3 个 DB 和 3 个用户,为他们各自的 DB 提供适当的填充权限。

However now the problem is when they login to phpmyadmin they cannot create a database it says #1044 - Access denied for user 'user'@'localhost' to database 'user_test'但是现在的问题是,当他们登录到 phpmyadmin 时,他们无法创建一个数据库,上面写着#1044 - Access denied for user 'user'@'localhost' to database 'user_test'

How should i overcome this?我应该如何克服这个?

First of all, login:首先,登录:

sudo mysql -u root

then just write:然后写:

GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建用户的数据库权限-Mysql访问权限 - Create database permission to user - Mysql access previleges MySQL用户创建数据库需要什么权限? - What permission is required for a MySQL user to create a database? 尽管没有 supper 用户,但如何在 MYSQL 中向(root)用户授予 supper 权限? - how to give supper permission to (root) user in MYSQL, despite of there is no supper user? 如何在mysql中为用户授予创建会话权限 - How to give create session privileges to a user in mysql 如何创建用户并授予权限MySql - How to create user and grant permission MySql 在 MySQL 中创建新用户并授予它对一个数据库的完全访问权限 - Create new user in MySQL and give it full access to one database 已向用户授予对数据库的删除权限,但是杂种服务器显示Mysql :: Error:对用户拒绝了DELETE命令 - Delete permission is granted for user to database but mongrel server shows Mysql::Error: DELETE command denied to user 授予用户删除和创建特定数据库的权限 - Give user permission to drop and create specific databases 如何在 mysql 5.6 中为用户添加仅 mysql 数据库备份权限? - How to add ONLY mysql database backup permission for a user in mysql 5.6? 如何在MySQL中为用户授予CREATE USER和GRANT特权? - How can I give CREATE USER and GRANT privileges to an user in MySQL?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM