“Simple MYSQL commands” 2

Posted by Piyush Gupta on July 05, 2010

Here I shall be jotting down one by one simple SQL commands that we use .

Check the comments .

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. Piyush Gupta Mon, 05 Jul 2010 12:08:46 UTC

    Open command line

    Type below to get into mysql via command line
    >> mysql -u root -p password ;
    [Password is the actual mysql password]

    then to check databases
    >> show databases ;

    Note down the database .

    for mysql db dump , exit mysql

    >> mysqldump -u root -p database > database.sql

    [Replace database with actual database name]

  2. Piyush Gupta Fri, 09 Jul 2010 08:31:12 UTC

    Reverse thing to load the dump to DB .

    Open command line

    Type below to get into mysql via command line
    >> mysql -u root -p password ;
    [Password is the actual mysql password]

    then to check databases
    >> show databases ;

    Note down the database .

    for mysql db dump , exit mysql

    >> mysql -u root -p database < /path/to/database.sql

    [Replace database with actual database name]

Comments