HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
i am developing at vb.net,
i have this connection string,
public OdbcConnection con = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=db_smis; User=root;Password=;");
there is no problem with it, while my Server is set to "localhost".
The problem comes when i change the value of the "Server=" using IP address, or even my Computer name(which is the same pc i am working on) but the connection would become so slow. It would even take 5-10 secs to load a form setting the Server=(IPAddress/PC-name)..
I don't know what seems to be the problem, using "Server=localhost" loads data fast.
When i tried to use another unit to connect to my main computer using another pc, the connection would be very slow.
Please help me on this one.
Re: HELP (VB.NET): MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
I tried using higher version of ODBC Driver but the problem is still there. Please help me
Re: HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
I tried using Higher version of ODBC driver but the problem is still there. Please help me.
Re: HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
I'm afraid I doubt we're going to be able to help much from here but the problem is obvious. LocalHost goes straight to your machine but anything else (including using the computer name you're working on) goes out to the network. So the problem is almost certainly Network based and nothing to do with the connection string or drivers you're using.
You could try the General PC sub-forum to see if you can get some help there but I suspect this is one of those things someone needs to be on site to help with.
Good luck.
Re: HELP (VB.NET): MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
What problem? Your server is addressed using 'localhost'? Why the urge to change it?
Doctor, doctor, it hurts when I do this!
Well don't do it then!
Re: HELP (VB.NET): MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
well... if it's anythign like my setup you use localhost for initial development, but then a live server for production or testing.
At any rate, to the initial problem... the reason is quite simple... let's say you needed to open a window... your current settings tell you that you should open a window to your own house... so you go over and open the window... fairly simple and quick, right? Ok, now imagine that your settings now tell you that you need to open a window at 123 Main Street... well, now you have to figure out where Main street is, find 123 and then open the window... take a little longer, doesn't it? Same thing... the IP Address is jsut that.. an ADDRESS... so it needs to be resolved and found.. it's not instantaneous... plus the speed of the server itself is an issue as well as network configuration and traffic...
-tg
edit - 5-10 seconds really isn't that much of a deal... yeah, sure it seems like it when you're sitting there... but 1) you should only be making connections when you need to, not when the form is loading and 2) I'd be more concerned if it was taking more than 20-30 seconds... but that's just me... a lot of it is relative (I have queries that run for hours!) ...
Re: HELP (VB.NET): MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
Quote:
Originally Posted by
dunfiddlin
What problem? Your server is addressed using 'localhost'? Why the urge to change it?
Doctor, doctor, it hurts when I do this!
Well don't do it then!
Because other people will be accessing my Main Unit which will be used as server for testing, while development is ongoing. How would they access my database on my unit if on my APP the connection is set to localhost?(if its set to localhost, the app they will use will refer to their own unit when they test the app)
The scenario is that, i will be giving them copy of my app in .exe, and that .exe would remote access my database in my Main Unit.
Re: HELP (VB.NET): MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
Quote:
Originally Posted by
techgnome
well... if it's anythign like my setup you use localhost for initial development, but then a live server for production or testing.
At any rate, to the initial problem... the reason is quite simple... let's say you needed to open a window... your current settings tell you that you should open a window to your own house... so you go over and open the window... fairly simple and quick, right? Ok, now imagine that your settings now tell you that you need to open a window at 123 Main Street... well, now you have to figure out where Main street is, find 123 and then open the window... take a little longer, doesn't it? Same thing... the IP Address is jsut that.. an ADDRESS... so it needs to be resolved and found.. it's not instantaneous... plus the speed of the server itself is an issue as well as network configuration and traffic...
1) you should only be making connections when you need to, not when the form is loading.
So, remote access using IP address normally takes longer. This explains my problem, i was just bothered if i have done something wrong but its seems its just normal. Thanks for your reply..
Re: HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
Quote:
Originally Posted by
FunkyDexter
I'm afraid I doubt we're going to be able to help much from here but the problem is obvious. LocalHost goes straight to your machine but anything else (including using the computer name you're working on) goes out to the network. So the problem is almost certainly Network based and nothing to do with the connection string or drivers you're using.
You could try the General PC sub-forum to see if you can get some help there but I suspect this is one of those things someone needs to be on site to help with.
Good luck.
Thanks for the reply. I was just bothered if i might have done something wrong but it seems remote access through IP normally takes longer. Thank you..
Re: HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
Also... please only one thread per problem.... I'll ask the mods to merge the two...
http://www.vbforums.com/showthread.p...OW-CONNECTION-)
-tg
Re: HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )
Duplicate threads merged.
One thread for one topic in one forum section please.