Skip to content

Creating mysql users from the command line


Today I had to add a mysql user for a web application that a server migration is underway for. And I couldn’t remember how. It’s been a while. Thanks to a bit of help from this guide, things are smooth sailing.

The hackery:

root@rehauedge:~# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE USER 'newusername' IDENTIFIED BY 'newuserpassword';


Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: