/    Sign up×
Community /Pin to ProfileBookmark

cant create new table with .sql file from mysql dump

I’ve tried the following but I keep just getting a syntax error (ERROR 1064)

onds to your MySQL server version for the right syntax to use near ‘mysql -p -h
mysql demo < c:/mysql/bin/mydump.sql’ at line 1
mysql> mysql demo < c:/mysql/bin/mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo <
c:/mysql/bin/mydump.sql’ at line 1

mysql> mysql < mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql < mydu
mp.sql’ at line 1

mysql> mysql -u -p demo;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql -u -p
demo’ at line 1

mysql> mysql demo < dump.sql;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo <
dump.sql’ at line 1

mysql> mysql -uneil demo < mydump.sql;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql -uneil
demo < mydump.sql’ at line 1

mysql> mysql demo < mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo <
mydump.sql’ at line 1

mysql> exit
Bye

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.

mysql> mysql demo < c:/mysql/bin/mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo <
c:/mysql/bin/mydump.sql’ at line 1
mysql> mysql -p -h localhost demo < c:/mysql/bin/mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql -p -h
localhost demo < c:/mysql/bin/mydump.sql’ at line 1
mysql> mysql -p -h mysql demo < c:/mysql/bin/mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql -p -h
mysql demo < c:/mysql/bin/mydump.sql’ at line 1
mysql> mysql demo < c:/mysql/bin/mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo <
c:/mysql/bin/mydump.sql’ at line 1
mysql> mysql < mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql < mydu
mp.sql’ at line 1
mysql> mysql -u -p demo;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql -u -p
demo’ at line 1
mysql> show all;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘all’ at line
1
mysql> show;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ” at line 1
mysql> display;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘display’ at
line 1
mysql> mysql demo < dump.sql;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo <
dump.sql’ at line 1
mysql> mysql –user neil –password=neil demo < mydump.sql;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql –user
neil –password=neil demo < mydump.sql’ at line 1
mysql> mysql -uneil -pneil demo < mydump.sql;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql -uneil
-pneil demo < mydump.sql’ at line 1
mysql> mysql -uneil demo < mydump.sql;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql -uneil
demo < mydump.sql’ at line 1
mysql> mysql demo < mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo <
mydump.sql’ at line 1
mysql> exit
Bye

C:mysqlbin>mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 7 to server version: 4.0.23

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.

mysql> mysql demo < mydump.sql;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo <
mydump.sql’ at line 1

mysql> create database demo_crm
-> ;
Query OK, 1 row affected (0.08 sec)

mysql> mysql demo_db < mydump.sql
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near ‘mysql demo_d
b < mydump.sql’ at line 1
mysql>


—————————

please help ?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@neilauthorJan 18.2005 — I'm a total numnut! ?

mysql 'un-dumping' only works from the dos prompt not the mysql prompt

*bang head against wall*
×

Success!

Help @neil spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...