MySQL issue
MySQL issue
MySQL issue
MySQL issue
MySQL issue
MySQL issue MySQL issue MySQL issue MySQL issue MySQL issue MySQL issue MySQL issue MySQL issue
MySQL issue MySQL issue
MySQL issue
Go Back  Xtreme Visual Basic Talk > > > MySQL issue


Reply
 
Thread Tools Display Modes
  #1  
Old 12-27-2017, 05:33 AM
Roger-U Roger-U is offline
Centurion
 
Join Date: Apr 2008
Location: Surrey, UK
Posts: 116
Default MySQL issue


well it's not strictly a vb question. but using vb and MySQL
I have the strangest problem:

MySQL accepts the connection normally (and gives the relevant error if i use a wrong password etc)
But it the closes the connection on as soon as i try to Read

But this only happens with one of my databases - it works as expected on the other identical database on a different server.

If i take my laptop to a friend's house it works fine there.

Other people are using my same program at various location in the country without any problems.

I have reset the router - so getting a different IP address.

I also have another different database on the same server and that one works perfectly.

I have tested it with my computer and 2 laptops - somehow MySQL allows the connection but the closes it on Read for any computer using my internet.

It is all so strange i can't even explain it properly!!!

somehow MySQL on server 1 is closing (after allowing the connection) for any computer using my internet connection, even though my IP is not fixed (it changes if i restart the router) .. and it only does this for one of the two databases on server 1. All works fine against server 2 with the same duplicated databases.

And I have an old router - using that one makes no difference

This all started after the Windows R2012 server update on Nov 29th. But I removed that update and the problem remained.


Yes i know this is not specifically VB ... but ... this site is very quiet these days ... and i have exhausted all the suggestions anyone has given me so far...

just thought i'd ask... Roger
Reply With Quote
  #2  
Old 12-27-2017, 06:38 PM
Cerian Knight's Avatar
Cerian KnightMySQL issue Cerian Knight is offline
Polymath (in disciplina)

Super Moderator
* Expert *
 
Join Date: May 2004
Location: Michigan
Posts: 4,206
Default

This official page seems to be comprehensive on the subject of lost connections and provides some trouble-shooting advice:
https://dev.mysql.com/doc/refman/5.7/en/gone-away.html
Also, for additional advice, check the user comments toward the bottom.
__________________
I got all the answers wrong on the GLAT, apparently even #9 (where I put a period in the middle of the box and labeled it 'singularity ripe for rapid inflation').
Reply With Quote
  #3  
Old 01-13-2018, 03:43 PM
Roger-U Roger-U is offline
Centurion
 
Join Date: Apr 2008
Location: Surrey, UK
Posts: 116
Default

Well there must be an explanation... mustn't there ???

as I said the problem was never the connection - that always worked.
and I could Update the database
but the first Select just returned an empty record set - no error
thereafter I always get Connection closed

if I take my computer somewhere else (another internet connection - same ISP) it worked

anyway ... Using HeidiSQL I renamed the database - that is all - and now it works
(the connection string is in an INI file - so no rebuilding the exe)

for some reason MySQL did not like me reading from one database - I had no issue with another database on the same MySQL server

And I had even tried swapping my router/modem with an old one.

Anyway... I guess it'll be a mystery forever now
Roger
Reply With Quote
  #4  
Old 01-27-2018, 02:41 AM
Roger-U Roger-U is offline
Centurion
 
Join Date: Apr 2008
Location: Surrey, UK
Posts: 116
Default

well even that only worked for a day.

So then I had another brainwave (ripple) - I installed MariaDb ODBC driver
And that does work.

I can select which to use when I start the program and it has been consistent
ever since:
MariaDb ODBC 3.0 works - every time, all the time
MySQL ODBC 5.3 works on all except one of my databases
on the failing one it connects, and Updates, but the first Select Closes it

I give up...
Reply With Quote
  #5  
Old 02-14-2018, 03:22 AM
Roger-U Roger-U is offline
Centurion
 
Join Date: Apr 2008
Location: Surrey, UK
Posts: 116
Default

Well ... it turns out that the MySQL server closes the connection on a Select statement if the IIS web server has SNI disabled .????

How or why the MySQL server cares. And if it does care it only cared with one of the two databases on that server.

And this is all on the server - so why the problem goes away if my PC uses Maria ODBC I have no idea

For some reason the company that processes payments for us cannot post back their references if we have SNI enabled - they have said "we are working on it" - but unless they work very fast they will lose our business!
Reply With Quote
Reply

Tags
server, mysql, connection, router, databases, computer, internet, database, closes, fine, update, read, closing, duplicated, allowing, fixed, restart, makes, suggestions, days, exhausted, roger, quiet, nov, 29th


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
MySQL issue
MySQL issue
MySQL issue MySQL issue
MySQL issue
MySQL issue
MySQL issue MySQL issue MySQL issue MySQL issue MySQL issue MySQL issue MySQL issue
MySQL issue
MySQL issue
 
MySQL issue
MySQL issue
 
-->