Bug #63150 Access denied for user 'root'@'localhost'

Submitted: 8 Nov 2011 14:58 Modified: 8 Nov 2011 17:44
Reporter: Andrew Xavier Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Information schema Severity:S2 (Serious)
Version:5.1.58 OS:Linux (Ubtuntu Server 11.10)
Assigned to: CPU Architecture:Any

[8 Nov 2011 14:58] Andrew Xavier
Description:
Hello,

When trying to import my MySQL databases via mysql -u root -p -A < /home/andrewx/localhost.sql I cannot import all my databases, as the import stops at 'information_schema'. This is due to the following error: ERROR 1044 (42000) at line 37791: Access denied for user 'root'@'localhost' to database 'information_schema'. Please help me to be able to import all my databases!

Thank you,

Andrew.

How to repeat:
1. Type command mysql -u root -p -A < PATHTOSQL
2. Enter Your Password
3. This error displays:
ERROR 1044 (42000) at line 37791: Access denied for user 'root'@'localhost' to database 'information_schema'
4. Databases subsequent to 'information_schema' are not imported.

Suggested fix:
Allow importation to information_schema as root.
[8 Nov 2011 17:44] Shane Bester
sorry this is not a bug.  the information_schema is a virtual database, and you should not be importing or dumping information_schema in the first place.  if this sql dumpfile was created by mysqldump, it was probably an old version from 4.1.
in that case use a current version of mysqldump instead.  

you can skip importing information_schema by giving --force option to mysql client.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.