Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

What is the command for that?

Thanks

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
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 '09 at 2:37

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.