Submitted by securewebs on Wed, 05/06/2015 - 10:13 Pro Licensee
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
Submitted by andreychek on Wed, 05/06/2015 - 10:20 Comment #1
Howdy -- can you paste in the full output you're seeing when attempting to create a database?
Submitted by securewebs on Wed, 05/06/2015 - 11:10 Pro Licensee Comment #2
Not much to it. ----- Failed to create database : A database with the same name already exists-----
Submitted by andreychek on Wed, 05/06/2015 - 11:15 Comment #3
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?
Submitted by securewebs on Wed, 05/06/2015 - 12:21 Pro Licensee Comment #4
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.
Submitted by securewebs on Wed, 05/06/2015 - 13:02 Pro Licensee Comment #5
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.
Submitted by andreychek on Wed, 05/06/2015 - 14:54 Comment #6
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!