Results 1 to 11 of 11

Thread: HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2010
    Posts
    6

    Exclamation 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.

  2. #2

    Thread Starter
    New Member
    Join Date
    Sep 2010
    Posts
    6

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2010
    Posts
    6

    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.

  4. #4
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,957

    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.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  5. #5
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    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!
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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!) ...
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    New Member
    Join Date
    Sep 2010
    Posts
    6

    Re: HELP (VB.NET): MySQL ODBC 3.51 Driver ( SLOW CONNECTION )

    Quote Originally Posted by dunfiddlin View Post
    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.

  8. #8

    Thread Starter
    New Member
    Join Date
    Sep 2010
    Posts
    6

    Thumbs up Re: HELP (VB.NET): MySQL ODBC 3.51 Driver ( SLOW CONNECTION )

    Quote Originally Posted by techgnome View Post
    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..
    Last edited by palawapaw; Jan 5th, 2013 at 10:26 PM.

  9. #9

    Thread Starter
    New Member
    Join Date
    Sep 2010
    Posts
    6

    Re: HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )

    Quote Originally Posted by FunkyDexter View Post
    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..

  10. #10
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  11. #11
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: HELP: MySQL ODBC 3.51 Driver ( SLOW CONNECTION )

    Duplicate threads merged.

    One thread for one topic in one forum section please.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width