Extracting an existing schema in MySQL, getting an unknown error, need help
Trying to dump the schema for an existing MySQL database. Appears the best way is this command:
CMD:
mysqldump -d -u root -pPASSWORD_REMOVED MyOffice
NOTE: There is no space between "-p" and "PASSWORD_REMOVED", and PASSWORD_REMOVED equals开发者_开发百科 my password; which is working. MyOffice is the database name.
OUTPUT:
mysql> use MyOffice;
Database changed
mysql> mysqldump -d -u root -pPASSWORD_REMOVED MyOffice
-> ;
ERROR 1064 (42000): 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
dump -d -u root -pmysql123 MyOffice' at line 1
GOOGLE: This is what I've Googled so far, search-1, search-2... no luck
You are executing mysqldump from the mysql prompt which is not correct! This is clear from your output.
You have to execute the mysqldump command from the system command prompt (shell), not from mysql prompt!
精彩评论