ID #1106

Backup issue: Routines don't restore


There are two known reasons for this:

1) It can be a privilege issue. It is described here.

2) Or it can be because of a bug with the MySQL server. MySQL 5.0.20 introduced the substring " DEFINER 'user'@'host' " in the ROUTINE definition. When querying MySQL about the CREATE ROUTINE statement MySQL returns that substring and it is inserted into the .sql backup file. However some MySQL versions returned the 'infamous' MySQL server error 1064 "You got a syntax error ..." when trying to execute a CREATE ROUTINE statement with such DEFINER substring. This affects MySQL 5.0.20, 5.0.21, possibly 5.0.22 and possibly some 5.1.x builds before 5.1.11. This was fixed 'silently' by MySQL AB (without creating a bug report and without noting it in the server changelogs). It works from 5.0.23 (and maybe even 5.0.22)


Categories for this entry

Tags: -

Related entries:

You can comment this FAQ