mySQL database errors

A virtual account indicated no databases but when we try to create one it says the database already exists. We have restored the site a dozen times from a dozen different backups. That restore will error out if we don't deleted any mySQL tables there are with a CBexception error. The only reference I can find in the mysqld.log is ----- 6:53:29 [ERROR] Invalid (old?) table or database name 'lightspeed-old' --- That may not mean much, I had changed the name of the mySQL database folder before a restore to see if that would help. Just don't know where to go from here.

Status: 
Active

Comments

Howdy -- can you paste in the full output you're seeing when attempting to create a database?

Not much to it. ----- Failed to create database : A database with the same name already exists-----

What's the name of the database you're trying to create?

And if you attempt creating a database with a different name under that same account, does it work in that case?

Yes, I can create another database no problem, but when I attempt to restore from a backup it won't restore the mySQL because it says there is already a database of that name. I could add 10 databases but it is not going to add the tables and data because it does not match the database in the backup. The rub is the control panel says there is none and physically in var/lib/mysql there is no database.

I finally figured out a solution. Like an idiot, I did not think to use phpmyadmin till just now. It did show the database, though it had no tables or data. Somehow, the control panel just could not find the database. Anyway, deleted the database via phpmyadmin and restored an older backup and finally the site it running. Thanks. What a relief. Please close the ticket.

Ah, good thinking -- I didn't think of that either!

Your solution led me to a simple way to handle this in the future.

What you could do is go into Edit Databases -> Import Database.

If there are any databases on your server that Virtualmin thinks aren't owned by a Virtual Server, you'll see them there and can import them.

However, your solution of removing them using phpMyAdmin works as well!