Thursday, 16 January 2014

Mysql snippet

--Get only the column name of the table
SELECT column_name
FROM information_schema.columns
WHERE table_name = 'table_name'



Restoring the Database

Cd to the directory where .sql file reside.

mysql -uroot -p dbname < db.sql

It will ask for the password
key the correct mysql password and press enter
Please wait till the command prompt comes again

No comments :

Post a Comment