Click to See Complete Forum and Search --> : cant create new table with .sql file from mysql dump


neil
01-18-2005, 04:40 AM
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:\mysql\bin>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 :)

neil
01-18-2005, 04:50 AM
I'm a total numnut! :D

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

*bang head against wall*