Jump to content

Remote Connection To Mysql


cezihcp

Recommended Posts

Hi again,

 

I'm trying to connect to a database remotely via vb.net and have setup remote access and a new user for the database(one which I have not yet used to connect to the database) and I'm getting the error that the user has more active connections than the allowed max_user_connections.

 

The weirder thing is than when i check the process list the named user cezihred_euput isn't even listed, just

my cpanel username twice as the user.

 

 

Link to comment
Share on other sites

That error is because you're using persistent connections. I checked and you had a bunch of open mysql connections just sleeping. Some of which hadn't sent or received a single byte of data in over two hours. The solution to this error is to close your connections after you're done using them. If each connection is only open for a couple milliseconds while the query is being performed and then closed immediately it would be highly unlikely you'd ever see this error again. Let me know if you need me to manually close your connections again.

Link to comment
Share on other sites

That's interesting... I always close them post query... Yes, I would appreciate if you closed them.

 

UPDATE:

just checked and I had a script with a rather big if/else tree and I neglected to foresee that if one if failed that the connection

wouldn't be close. It's fixed now, sorry for the bother.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...