When backing up a database, the data table may have such a value array ('A' = 'B ',
'C' = 'D ')
Value in this format. During data export, the newline is replaced with \ n (in windows, Unix may be another symbol ). When you reply to data, if you use MySQL-H localhost-u root-proot <path /*. when the SQL statement is restored, the database reports an error message indicating that the "\ n" character cannot be recognized to terminate the operation. After thinking for a long time, is there an option during data export to prohibit line breaks from being converted to "\ n"? After reading all the options of mysqldump, no solution is found. The problem is that data is being imported.
Later, we noticed that when we restored the data above, it was executed in the State of no data connection. Then, we connect to the database first, that is, execute mysql-H localhost-u root-proot to enter the database, and then execute mysql> Source Path/* When the database connection is successful /*. SQL statement, OK, data imported successfully.