Mysql – how to create a user in thesql 5.1 with all permissions

MySQL

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

What is the command for that?

Thanks

Best Answer

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.