13Apr

MySQL recipe #1

Posted by Elf Sternberg as Uncategorized

I’m putting this here because I’m tired of losing it.  I hate having to look up every time the exact same recipe for “how do I create a new empty database for Django or Rails in MySQL?’  It’s in two different sections of the O’Reilly MySQL in a Nutshell book, and while I have both bookdarted and know where to find them, it’s nice to have them in just one place!  The  phrase ‘to X’ on line 4 is the database username, and the ‘identified by’ string there is your database password, in case you were wondering.

# mysql -u admin -p
password:
mysql> create database secretproject;
mysql> grant all on secretproject.* to secretproject identified by 'redacted';
mysql> flush privileges;
mysql> quit;
#

Comment Form

Subscribe to Feed

Categories

Calendar

April 2009
M T W T F S S
« Feb   May »
 12345
6789101112
13141516171819
20212223242526
27282930