Skip to content

Creating mysql users from the command line

2011/03/23

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';

Sweet.

Advertisements
Leave a Comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: