ifsnop / mysqldump-php

PHP version of mysqldump cli that comes with MySQL
https://github.com/ifsnop/mysqldump-php
GNU General Public License v3.0
1.25k stars 300 forks source link

restore error - Mysql 8 #272

Closed silvasamu closed 2 months ago

silvasamu commented 11 months ago

Hello, I made the backup using this library and when restoring it gave me two errors:

** The first is function. Please remove one ";"

Local:
"/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;".PHP_EOL. "/*!50003 SET sql_mode = '".$sqlMode."' */ ;;".PHP_EOL. "/*!50003 SET @saved_time_zone = @@time_zone */ ;;".PHP_EOL. "/*!50003 SET time_zone = 'SYSTEM' */ ;;".PHP_EOL.

** The second is that the tables and columns are in double quotes "teste_table", the correct one is vim "teste_table"

Local:

$createTable = $row['Create Table']; if ($this->dumpSettings['reset-auto-increment']) { $match = "/AUTO_INCREMENT=[0-9]+/s"; $replace = ""; $createTable = preg_replace($match, $replace, $createTable); }}

My best regards!!!

ifsnop commented 2 months ago

I can't get your results. could you provide some example code?