MySQL Tips

 

MySQL server version:

select version(); #As of 2010.05.25 this returns: 5.0.51a-log

 

db location: /home/mysql/

Things to do as root

 

To show entire user table:
SELECT * FROM mysql.user;

To see most useful part of user table:
SELECT host, user, password, select_priv, insert_priv, update_priv, delete_priv, create_priv, drop_priv from mysql.user;

Add user

Add host to user

INSERT INTO user (Host,User,Password) VALUES('hostname','username','password_hash');

show databases;

CREATE DATABASE my_database_dev;

CREATE DATABASE my_database_test;

CREATE DATABASE my_database_prod;