Bug #21295 Access denied on information_schema while restoring a full backup
Submitted: 26 Jul 2006 11:12 Modified: 27 Jul 2006 9:30
Reporter: Mickael Besson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.17c OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any

[26 Jul 2006 11:12] Mickael Besson
Description:
When I try to restore a full backup (with --all-databases parameter), console displays this error message :

>mysql < d:\toto.sql -u root -p***
ERROR 1044 (42000) at line 21: Access denied for user 'root'@'localhost' to data
base 'information_schema'

I saw on a forum that the solution of this problem is to not mention the information_schema DB while creating the backup.
In this case, how could we backup and then restore views, trigers (,...) which are stored in information_schema DB ?

How to repeat:
create a full backup with "--all-databases"

try to restore this backup with "mysql < d:\backup.sql
[26 Jul 2006 12:05] MySQL Verification Team
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/

Additional Info:

Currently mysqldump ignores information_schema when issuing --all-databases

Microsoft Windows XP [versão 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\mysql\bin>mysql -uroot -e"select version()"
+---------------------+
| version()           |
+---------------------+
| 5.0.22-community-nt |
+---------------------+

c:\mysql\bin>mysqldump -uroot --all-databases > backup.sql

c:\mysql\bin>dir backup.sql
 O volume na unidade C não tem nome.
 O número de série do volume é C0FB-E588

 Pasta de c:\mysql\bin

2006-07-26  09:02         4.127.794 backup.sql
               1 arquivo(s)      4.127.794 bytes
               0 pasta(s) 11.516.579.840 bytes disponíveis

c:\mysql\bin>mysql -uroot < backup.sql

c:\mysql\bin>
[26 Jul 2006 12:26] Mickael Besson
"This issue has already been fixed in the latest released version of that product... 5.0.22"
OK, but the last "certified software" is MySQL 5.0.17c and we would want to keep these type of binary.
Will you upgrade your "certified software" version soon to 5.0.22 ?
[26 Jul 2006 17:47] Kent Boortz
At this time we don't have a delivery date for the
next certified release.