Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an existing database, named dlti.sql

I want to transfer it to a Linux-based server. I tried using this code, however I get no response:

mysql -u root -p Desktop < dlti.sql

The .sql file is located at the desktop.

Can anyone help me with this?

share|improve this question

migrated from Nov 5 '13 at 4:52

This question came from our site for professional and enthusiast programmers.

What is the working directory that you're running this from (i.e. what is the output of pwd? Also, where is MySQL running... on the local machine, or on a remote? – Thomas Kelley Nov 5 '13 at 3:50
I think you need to create the database first and then import the db – andypp Nov 5 '13 at 3:51
I'm doing this on the local machine. After I enter the code all I get is' -->' and that's it. – maecy m Nov 5 '13 at 3:53

You have to add the target database name.

$mysql -u root -p -h localhost

mysql> create database foo;
mysql> exit;

$mysql -u username -p -h localhost DATA-BASE-NAME < data.sql 
share|improve this answer

Just did a quick google search. Have you tried this? Open up your database in phpMyAdmin and then select Export from the menu. Scroll down and select the Save as file checkbox and then press Go.

Now open up the database in phpMyAdmin on the remote server (Note: you will need to create the database first) and then select Import from the menu. Browse to the file you saved and press Go.

If everything goes well you should now have a mirror image of your database on the remote server.

REFERENCE: How to move local MYSQL DB up to remote DB server

share|improve this answer
I have created the database, how do I import my database now? – maecy m Nov 5 '13 at 4:10
I'm guessing you have to install this: ...Once you have this installed, you access it on your local host and export it. Then you install it on your remote host and import the file that you exported, onto your remote host. You can try a demo of it out as well online before downloading. – dunce1 Nov 5 '13 at 4:31
Also, you should be able to access it on your local host by going to your http://(whatever your localhost IP is)/phpmyadmin. If you have trouble accessing this, I suggest you look here:… – dunce1 Nov 5 '13 at 4:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.