I've just encountered a very strange situation on my development machine: the database is listed in PHPMyAdmin, but without any tables. Intrigued, I opened up a
mysql client on the command line, and lo and behold:
mysql> CREATE DATABASE somedb; ERROR 1007 (HY000): Can't create database 'somedb'; database exists mysql> DROP DATABASE somedb; ERROR 1008 (HY000): Can't drop database 'somedb'; database doesn't exist
I'm running Arch Linux and have installed the Xampp package from the AUR; the MySQL install comes from there. I might have messed something up while I was setting up a new vhost, or not, but in any case I am at a complete loss as to what's happening.
Can anyone shed some light on this?
UPDATE: I tried restarting the
mysql server, and now it refuses to start back up. I'll have a look at the logs. Here's the relevant portion:
/opt/lampp/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13) 130109 15:16:13 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 130109 15:16:13 InnoDB: The InnoDB memory heap is disabled 130109 15:16:13 InnoDB: Mutexes and rw_locks use InnoDB's own implementation 130109 15:16:13 InnoDB: Compressed tables use zlib 1.2.3 130109 15:16:13 InnoDB: Initializing buffer pool, size = 16.0M 130109 15:16:13 InnoDB: Completed initialization of buffer pool 130109 15:16:13 InnoDB: Operating system error number 13 in a file operation. InnoDB: The error means mysqld does not have the access rights to InnoDB: the directory. InnoDB: File name /opt/lampp/var/mysql/ibdata1 InnoDB: File operation call: 'open'. InnoDB: Cannot continue operation. 130109 15:16:13 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/hostname.pid ended