Jump to content
Sign in to follow this  
ajoo

import a table into a DB

Recommended Posts

HI,

Why can't I import a table into my existing DB using the command below:

 mysql -u root -p mydatabase < file.sql;

This has always worked but now I get the following error.

Quote

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql  Ver 14.14 Distrib 5.7.27, for Linux (x86_64) using  EditLine wrapper Copy' at line 1
 

mysql version is 

Quote

vagrant@vagrant:~$ mysql --version
mysql  Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using  EditLine wrapper
 

Thanks !

 

Share this post


Link to post
Share on other sites

Hi, 

Kindly ignore the question. I think the sql is incorrect. 

Thanks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.