Start the console: mysql List all databases: Switch to a database: List tables in a current database: List columns in a given table: Setting permissions to a database: Deleting rows: Selects: Altering a table: ALTER TABLE get_cookie_log ADD COLUMN log_id INT(10) NOT NULL auto_increment, ADD PRIMARY KEY(log_id);` ALTER TABLE get_cookie_log ADD COLUMN log_id INT(10) NOT NULL auto_increment, ADD INDEX(log_id);` ALTER TABLE verify_reg_code_log ADD COLUMN log_id INT(10) NOT NULL auto_increment, ADD INDEX(log_id);` Backup database: Import database: mysql -e "DROP DATABASE $db; CREATE DATABASE $db;" mysql $databasename <$file-name.sql |