-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mysqldump backup sql file with mysqlbackup.net restore will prompt an error: #52
Comments
I wish to have a look at both SQL files created by MySqlDump and MySqlBackup.NET and see what are the differences between both files. |
Backup sql file see attachment |
I have found the bug. The error occurs at the "Procedure" block, where the delimeter is not handled correctly. You may try the following fixed version. I will patch the nuget version later. |
Nuget version was submitted. |
Thank you very much for this timely processing. |
Compiled dll released. |
Thank you very much, the problem has been solved. Ask a question, mysqldump backup table name in the database, after mysqlbackup.net restore, the letter case in the table name changed, there are no parameters to maintain uppercase and lowercase letters when restoring?or all converted to uppercase letters or lowercase letter? |
This is affected by a server variable: You can get the value by following SQL command:
On Unix, the value = 0 Read more about "Identifier Case Sensitivity" at MySQL documentation: How to change |
Ok, then I will try again. What you mean is that the uppercase and lowercase letters of the mysql database name have nothing to do with mysqlbackup.net restore, only related to the configuration of mysql. My database is configured with case-sensitive letters, mysql5.5 lower_case_table_names=1, |
|
Mysqldump backup sql file with mysqlbackup.net restore will prompt an error:
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 "at line 3
Mysqldump backup sql can be restored with mysqldump
Mysqlbackup.net can also restore his own backup sql
I want to be a dual-engine software, I hope 2 backup and restore tools can be cross-mixed
Is there a way to solve?
Mysqldump backup command
Command = string.Format("mysqldump --quick --host={1} --default-character-set={2} -R -E --lock-tables --routines --force --port={3 } --user={4} --password={5} {6} -r "{0}"",
Directory, host, characterSet, port, user, password, databaseName);
Mysqlbackup.net restore command, no other parameters, keep the default
characterSet = txtcharacterSet.Text.Trim();
databaseName = cmbDBlist.Text.Trim();
Host = txthost.Text.Trim();
Password = txtpassword.Text;
Port = txtport.Text.Trim();
User = txtuser.Text.Trim();
String ConnectString = String.Format("server={0};uid={1}; Port={2};pwd={3}; database={4};", host, user, port, password, databaseName) ;
ConnectString += "charset=" + characterSet + "; " + "convertzerodatetime=true;";
Try
{
Using (MySqlConnection myconn = new MySqlConnection(ConnectString))
{
Using (MySqlCommand cmmd = new MySqlCommand())
{
Using (MySqlBackup backCmd = new MySqlBackup(cmmd))
{
cmmd.Connection = myconn;
myconn.Open();
backCmd.ImportFromFile(strPath);
The text was updated successfully, but these errors were encountered: