Importing MySQL database using Linux Terminal 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 &lt; dlti.sql


The .sql file is located at the desktop.

Can anyone help me with this?
You have to add the target database name.

$mysql -u root -p -h localhost

mysql&gt; create database foo;
mysql&gt; exit;

$mysql -u username -p -h localhost DATA-BASE-NAME &lt; data.sql