So I’ve been tasked with merging two similar but quite different Databases together consisting of multiple databases (lower case d). Through the course of this I’m also removing old databases from both Databases. I’ve already set them both up to have the same user privs, so that won’t be an issue. What I notice that maybe a problem though is the mysql.db table. When I wrote and executed my scripts on a couple lab machines I notice that the mysql.db columns still show old databases that I had removed in the Db column. Any advice before I make this happen in production?
So far I’ve tried restarted the mysql daemon, truncating the table and restarting the daemon, and repairing the table… none of these worked.
Google isn’t much help, searching for the mysql.db table is more difficult than it should be :/
So I had to go out and buy the book. Short answer is MySQL reads from the
mysql.usertable first. Sincemysql.useris set up how we want it, themysql.dbtable isn’t super helpful.Long answer, do it by hand on a per user per database basis if you can’t just drop it and rely on your
mysql.usertable.Make sure you flush privileges too!