What happened is this: I had a MS-Acces DB which I transported to MySQL on 'Windows'. Now, the migration toolkit decided that it will NOT preserve the case of the tables - since this is Windows. OK - I ran my School Administration System and tested it on MySQL on Windows. Worked fine. Now, I decide to move the database to my server, and here is where it all started.
First, MySQL on Linux wouldn't let me connect to it from my workstation - no privileges. Fine. I used the MySQL Administrator to add the user, grant it privileges through the Global Privileges (you got to turn the Global Privileges on in Tools->Options).
That done, I ran my program. However, this time, I got the same error - username not authenticated. I wondered and wondered why. Then it struck me like lightning. O D B C !!!
Vb.Net uses MySQL ODBC connector, to connect to the database. This System and User DSN was configured to connect to my LOCAL machine, and not the SERVER! Damn damn damn!
I changed that, and viola! Things started running! Well, almost.
Now, VB.Net starts throwing exception after exception. No table this, no table that. I'm like - you cannot be serious. I see these tables, I see data in them, then why the heck won't you see them? Another bolt of lightning. C A S E! Damn damn damn. After cursing myself and the migration toolkit, I started looking, though sadly, for this parameter to be included in my.cnf: lower_case_table_names. I set this level to 1, so that MySQL will ignore the details about case-sensitivity. Yes, I will not keep my tables case sensitive from now on. But its too much work to rename all the tables in my VB.Net code.
Anyway, its up and running like a champ - so it seems for now. I'll put up any more issues that I see from here on.
No comments:
Post a Comment