mysql commands

Set mysql root password

mysqladmin -u root password 'new-password'


Show databases
mysql> show databases;
mysql> use databasename;


Show tables
mysql> show tables;


Show columns
mysql> select column from tables;


Backup database
$mysqldump -u  -p  > backupdatabase.sql


Restore database
mysql -u  -p  < databasebackup.sql

By penoi on Monday, April 23, 2012 | | A comment?
0 responses to “mysql commands”