• Importing MySQL Databases via SSH (using putty)

    If you want to manage databases without a control panel, you need to use the SSH command line to import .SQL backup files . 

    To Import MySQL Databases via SSH

    1. Log in to SSH as the root user. 
    2. To log in to MySQL, type mysql -u username -p, where username is your database username.
    3. When you see Enter password:, enter your password for that MySQL user.
    4. Type  use database_name; and then press Enter.
    5. Type SOURCE /path/to/sql/file.sql, and then press Enter.
      ( Using Putty login to your server 
      >mkdir foldername
      >chmod 777 foldername
      Then Login in WinScp
      >copy sql file to foldername folder)
    6. Monitor the running import log to check for errors.
    7. To confirm the data was imported correctly, type show tables; and then press Enter.
    8. Type select * from table; and then press Enter. Your imported MySQL database tables display.
    Import database in Wamp
    1. Open Mysql Console(Putty-  mysql -u root)
    2. mysql>use databasename
    Database changed
    3. mysql>  SET autocommit=0 ; source c:/filename.sql ; COMMIT ;(Putty: SET autocommit=0 ; source /foldername/filename.sql ; COMMIT ;
  • 0 comments:

    Post a Comment

    FAVOURITE LINE

    To steal ideas from one is plagiarism. To steal from many is Research.

    ADDRESS

    Mumbai , Maharashtra

    EMAIL

    shikha.pathak6@gmail.com
    shikha.the.swt.pari@gmail.com

    Skype

    shikha_pari