wp-migrate-db icon indicating copy to clipboard operation
wp-migrate-db copied to clipboard

Error in Windows path separator '\' when import .sql file in phpMyAdmin

Open lucas-viewup opened this issue 8 years ago • 0 comments

Hi, I noticed that in when you migrate db to Windows, for example:

/srv/mywebsiteC:\xampp\htdocs\mywebsite

When you go to import in phpMyAdmin, it throws this error:

Static analysis:
12 errors were found during analysis.
Unexpected character. (near "\" at position 0)
Unexpected character. (near "\" at position 1)
Unexpected character. (near "\" at position 2)
Unexpected character. (near "\" at position 3)
Unexpected character. (near "\" at position 4)
Unexpected character. (near "\" at position 5)
Unexpected beginning of statement. (near "\" at position 0)
Unexpected beginning of statement. (near "\" at position 1)
Unexpected beginning of statement. (near "\" at position 2)
Unexpected beginning of statement. (near "\" at position 3)
Unexpected beginning of statement. (near "\" at position 4)
Unexpected beginning of statement. (near "\" at position 5)
Comando SQL:
\\\\\\ /*!40101 SET NAMES utf8mb4 */
Mensagens do MySQL : Documentação
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '\\\\\\
/*!40101 SET NAMES utf8mb4 */' at line 1

But when you remove the line within .sql:

 Path: C:\\xampp\\htdocs\\mywebsite

The import becomes successful, but I didn't realise yet why PMA blocks commented '\' separator. Regards,

lucas-viewup avatar Sep 22 '17 13:09 lucas-viewup