user153742
user153742

Reputation: 377

Delphi and MySQL - periodically popping up database errors - how to fix it?

Sometimes the error "Mysql server has gone away" pops up. Sometimes "Lost connection to MySQL server during query" pops up.

I had previously developed a database in Access and wrote a form for it in Delphi - everything worked perfectly. Now I developed a database on MySQL (using the Open Server), wrote a form. When I work in the application, these errors periodically pop up. They are not tied to any action (I do different actions - there are no errors. Then one of them appears). I attach a screenshot of the errors.

How to fix it?

enter image description here enter image description here

Upvotes: 2

Views: 1608

Answers (1)

user153742
user153742

Reputation: 377

I found the answer. It was necessary for the element FDConnection to set a tick in the Object Inspector: Resource Options -> AutoReconnect -> true.

Upvotes: 3

Related Questions