Sunday, April 8, 2012

Beginning MySQL

Useful MySQL commands:
SHOW DATABASES - list databases on the server


Creating a user:
login locally as root
mysql -u root -p
Then,
mysql> create user 'username'@'%' IDENTIFIED BY 'password';
mysql>  grant CREATE,INSERT,DELETE,UPDATE,SELECT on <~DB~>.<~OBJECTS~> to username@location;


This assumes the database is already created;


Designing a mysql database with MySQL Workbench:
  Good walkthrough: http://net.tutsplus.com/tutorials/databases/visual-database-creation-with-mysql-workbench/