0

I want to create a user with permission to create database, import mysqldump files, create tables?

What is the command for that?

Thanks

2 Answers 2

4

Short answer: in the MySQL client, run the following:

GRANT ALL PRIVILEGES ON *.* to username@hostname_or_ip identified by 'password';

Longer answer:

There is really excellent documentation in the MySQL Reference Manual on this topic. Take special note of the chapter on User Account Management.

1
  • 1
    I should add that this query should be executed from the "root" account: the one that has "WITH GRANT OPTION" privilege
    – kolypto
    Jul 28, 2009 at 2:37
1

GRANT ALL ON *.* TO username@"%" IDENTIFIED BY "password";

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .