So, I'm trying to move an existing MySQL database from a Win2008 server to an Ubuntu machine, however when I try to import the dump file, MySQL is giving me a syntax error.
Below are the steps I took
(on windows machine, in mysql\bin)
.\mysqldump.exe -u root -p test > test.sql
(on windows machine, in cygwin)
scp test.sql myusername@hostname:~/
(on ubuntu machine)
$ mysql mysql> create table test2; $ mysql -u root -p test2 < test.sql
MySQL then stalls for a litle bit, and then throws... ERROR 106开发者_如何学编程4 (42000) at line 1: You have an error...
It's as if the error is in the dump file generated by windows. It is something in character conversion? or formatting? or something that I'm just just missing?
EDIT:
The error was that I needed to run a refresh before running mysqldump.exe. The command that did the trick was....
./mysqladmin.exe -u root -p refresh
EDIT:
The error was that I needed to run a refresh before running mysqldump.exe. The command that did the trick was....
./mysqladmin.exe -u root -p refresh
精彩评论