skip to Main Content

Guys I am trying to import database from a folder in the laptop to a live server via putty.
I have tried using:

mysql -u root -p dbname <"c:path to database.file.sql"

I have also tried to use:

c:path to database mysql -u root -p <file.sql
,but all in vain saying directory not found.

How can I import database from folder in laptop direct to centos via putty command line ?

2

Answers


  1. First of all you should transfer the file from your computer to your CentOS Server.
    I will suggest using WinSCP, (I prefer for not large size file transfers) it is very easy to use and it can help you a lot for the files edit, too.

    You should make a new connection putting your Server IP, username and password.

    enter image description here

    After that you can use drag and drop for files transfer.

    enter image description here

    You can use https://cyberduck.io/ , if you want.

    Login or Signup to reply.
  2. For copying tables or databases from local environment to my remote server, I use SQLYog – https://code.google.com/archive/p/sqlyog/wikis/Downloads.wiki
    I setup the connections to my remote environment and then to my server. Then, all you need to do is copy the database from one host to the other
    enter image description here

    Then select the remote host, database to which data should be copied and let the software do the rest of the work.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search