Not the answer you need?
Register and ask your own question!

ERROR 1049 (42000): Unknown database 'mysql' ..while executing USE mysql;

sandeepthakur.01sandeepthakur.01 EntrantCurrent User Role Beginner
Hi,
i am able to connect to mysql and also able to create new user, but while i execute show databases as root than it is not showing "mysql" database however i am able to query mysql tables. Nither I am able to find the Mysql database and mysql tables in information_schema.
i have 5.1.51-rel11.5-log(5.1.51-rel11.5-log Percona Server (GPL), 11.5, Revision 132) installed on linux.
However in Mysql data-directory where all the database files exist, there also i am unable to find Mysql database files.
I have created a new user it is successfully created & also logged in to Mysql server using that user, but the problem is that Mysql database is not listed & also not found in data directory.

Comments

  • sterinsterin Mentor Inactive User Role Contributor
    Sounds very weird.

    Start by checking the mysql error log and see if there is something in there.

    Otherwise here are some random thoughts:
    1. You don't have the correct access credentials to the mysql database. Check with SELECT from mysql.users table.
    2. You mysql data directory is not located on harddrive in the directory that you think. Check with SHOW VARIABLES

    But without any more details we have nothing to go on.
  • hnoor0077hnoor0077 Entrant Current User Role Beginner
    You don't have the correct access credentials to the mysql database. Check with SELECT from mysql.users table.
    thanks for sharing this.....
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.