Klaipedaville Posted October 29, 2014 Share Posted October 29, 2014 (edited) Hello there, I would be really grateful if someone could advice please, how do I find this pesky entry in the 'db' table? This is what it says, "Found an entry in the 'db' table with empty database name; Skipped." MySQL version is 5.5.40 I am pretty much stuck on it. Does it mean the table's name is db? Plus, I am not sure I understand the wording of it too. The empty database name cannot exist by default as it won't allow you to create a database without a name in the first place. I do not even know how and where to begin to look for it because honestly speaking I do not quite understand the phrase itself, because it does not make much sense to me. I would really highly appreciate it if someone could explain and suggest how do I find the... "whatever it says" :-) and to fix it. Many thanks in advance! P.S. I know this warning may easily and safely be ignored as it is of minor inconvenience and not that important the more so as MySQL is working fine but my curiosity is just running wild for two reasons: 1. I do not really understand what this warning message is trying to tell me and 2. How do I find and adjust it to turn off the warning. Simple regular things as running myisamchk -r *.MYI on where MySQL is did not help as this warning is actually out of scope of what myisamchk can fix. And yes, I've Googled it long enough but couldn't seem to come up with anything reasonable solutions. Thankful for any suggestions / pointers / assistance / comments at all. Edited October 29, 2014 by Klaipedaville Quote Link to comment Share on other sites More sharing options...
Barand Posted October 29, 2014 Share Posted October 29, 2014 you could try running this query and see if there is an empty schema name $sql = "SELECT SCHEMA_NAME , DEFAULT_CHARACTER_SET_NAME , DEFAULT_COLLATION_NAME FROM information_schema.schemata"; Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 29, 2014 Author Share Posted October 29, 2014 Hey Barand! Many thanks! I'll definitely give it a try to see if it tells me anything. Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 29, 2014 Author Share Posted October 29, 2014 it says it has an error in syntax.. Quote Link to comment Share on other sites More sharing options...
Barand Posted October 29, 2014 Share Posted October 29, 2014 (edited) It was working when it left the factory! What is the actual error message that you get? Edited October 29, 2014 by Barand Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 29, 2014 Author Share Posted October 29, 2014 This is what I get: Failed to execute SQL : SQL $sql = "SELECT SCHEMA_NAME , DEFAULT_CHARACTER_SET_NAME , DEFAULT_COLLATION_NAME FROM information_schema.schemata"; failed : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$sql = "SELECT SCHEMA_NAME , DEFAULT_CHARACTER_SET_NAME ' at line 1 Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 29, 2014 Author Share Posted October 29, 2014 However, doing it from a command line directly it says the following: ERROR 1102 (42000): Incorrect database name 'SELECT Quote Link to comment Share on other sites More sharing options...
Barand Posted October 29, 2014 Share Posted October 29, 2014 Try executing just the SQL SELECT SCHEMA_NAME , DEFAULT_CHARACTER_SET_NAME , DEFAULT_COLLATION_NAME FROM information_schema.schemata; Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 29, 2014 Author Share Posted October 29, 2014 Yes, this one worked, thanks! I was pretty close to it testing all types of input. However, running this command gave me just my databases list. I can easily see them without running any queries. What I am supposed to see / look for in this list of my databases after the command in question has been executed? Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 29, 2014 Author Share Posted October 29, 2014 this is pretty much the same as running show databases; except for it not showing default_character_set_name and default_collation_name Quote Link to comment Share on other sites More sharing options...
Barand Posted October 29, 2014 Share Posted October 29, 2014 It was to enable you to view the raw data held by MySQL to try and locate the blank name. Do you have another database on your server with a table named "DB" which might have the offending blank name? Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 29, 2014 Author Share Posted October 29, 2014 I see. Thank you for your input. Well, that's where the point was. I did not really understand what this warning message was saying and what I was supposed to look for. Now that's a bit clearer but still not clear enough. The 'db' as per this warning message is actually the name of a table? database? filed? or is it just some term in general that implies database = db? I went through every single database and almost every single field manually and I found one table named 'db'. Please, note it's not nameless as the warning says (if I am not mistaken), it's just its name is db. Do you think I could simply re-name that table to make this warning disappear? On the other hand is it possible to rename an existing table at all? I am not really sure as I do not see any options to re-name it. Perhaps there are some manual tricks to re-name tables aren't there? Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 29, 2014 Author Share Posted October 29, 2014 as I was saying I found the table named db manually... not sure if it's the only one db in there. Were there by any chances any queries to run to find the problematic 'db' (whatever that stands for) as per warning message? Quote Link to comment Share on other sites More sharing options...
Barand Posted October 29, 2014 Share Posted October 29, 2014 "Found an entry in the 'db' table with empty database name; Skipped." It sounds like the problem is with an empty value in one of the records inside that "db" table Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 30, 2014 Author Share Posted October 30, 2014 Now that is what I was looking for. Thank you. Now I at least I understand what this warning has been trying to say. Could you please, take a look at the screen-shot attached to tell me if I am on the right track here? Many thanks! Appreciate you taking part and your quick replies! Quote Link to comment Share on other sites More sharing options...
Barand Posted October 30, 2014 Share Posted October 30, 2014 (edited) That is a screenshot of the table structure (and looks correct). You should be looking at the data in that table to see if there really is one with a blank database name. Edited October 30, 2014 by Barand Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 30, 2014 Author Share Posted October 30, 2014 Right! You are the man! Thank you very much! There was indeed one nameless 'database name' but it did not have any names at all in fact it said 'Any' in a Database Name column. Now I've remembered setting it myself thinking that if I set it to 'any' (there is an option to choose to set it to 'any') it will allow connection to any databases for this user. It appears to be I was wrong and setting it to 'any' just results in a warning message. I have now fixed it. Although there are two more warnings copy-pasted down below but I don't think they are related to my data or anything aren't they? I guess they have something to do with my MySQL version (5.5.40) and simply tell me that these issues will be removed in the future releases. Is that not right is it? [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead. Quote Link to comment Share on other sites More sharing options...
Barand Posted October 30, 2014 Share Posted October 30, 2014 What software are you using to view the tables and produce the data shown in your screenshot? Is it an old version that requires updating, or replacing altogether? Quote Link to comment Share on other sites More sharing options...
Klaipedaville Posted October 30, 2014 Author Share Posted October 30, 2014 My screen-shot was taken from Webmin and my Webmin is the latest version. The other warnings I took directly from a Linux command line and I used putty for that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.