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

  • Filter
  • Time
  • Show
Clear All
new posts

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

    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.

  • #2
    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.