3

I'm trying to restore the empty DB for mydb table but the syntax of mysqlimport doesn't seem to be straight forward. I had earlier created the file emptyDbs when doing a mysqldump.

mysqlimport mydb/var/tmp/emptyDbs
4
  • You simple need to call, mysql command. Commented Sep 30, 2018 at 16:25
  • Still a problem.. echo "mysqlimport mydb /var/tmp/emptyDbs" | mysql statsdb ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysqlimport /var/tmp/emptyDbs' at line 1 Commented Sep 30, 2018 at 16:27
  • Use mysql < file_to_import.sql Commented Sep 30, 2018 at 16:29
  • 1
    You could refer stackoverflow.com/questions/17666249/… for more details Commented Sep 30, 2018 at 16:31

1 Answer 1

1
 mysql statsdb < /var/tmp/emptyDbs
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.