Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1062555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:38:45+00:00 2026-05-16T18:38:45+00:00

Here my code snippet: query.next(); qDebug()<<query.lastError(); qlonglong res=query.value(0).toLongLong(); qDebug()<<query.lastError(); and the corresponding log I

  • 0

Here my code snippet:

query.next();
qDebug()<<query.lastError();
qlonglong res=query.value(0).toLongLong();
qDebug()<<query.lastError();

and the corresponding log I have:

Debug: QSqlError(2006, "QMYSQL: Unable to execute query", "MySQL server has gone away") 
Warning: QSqlQuery::value: not positioned on a valid record
Debug: QSqlError(2006, "QMYSQL: Unable to execute query", "MySQL server has gone away")

Normally my program works just fine (it works on a server and accepts connections from clients), but every morning when I tried to connect it, I’m getting messages above.

What can be the problem with MySQL server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:38:45+00:00Added an answer on May 16, 2026 at 6:38 pm

    From the MySQL Manual:

    The most common reason for the MySQL server has gone away error is that the server timed out and closed the connection.

    …

    By default, the server closes the connection after eight hours if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld.

    …

    If you have a script, you just have to issue the query again for the client to do an automatic reconnection. This assumes that you have automatic reconnection in the client enabled (which is the default for the mysql command-line client).

    See this manual page for more details on this error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 532k
  • Answers 531k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The reportlab canvas has a drawCentredString method. And yes, they… May 17, 2026 at 12:02 am
  • Editorial Team
    Editorial Team added an answer look at the firefox activex control http://www.iol.ie/~locka/mozilla/control.htm May 17, 2026 at 12:02 am
  • Editorial Team
    Editorial Team added an answer Instead of having to use & to pass the reference… May 17, 2026 at 12:02 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I need help converting the following code snippet to use SPSiteDataQuery instead of SPQuery
I have an array being returned from the database that looks like so: $data
I'd like to create a PHP image generator that takes several query string parameters
Is there a way to query SQL Server XML type so that for an
I am trying to execute a sql query as another login using the 'Execute
We have got a custom MembershipProvider in ASP.NET . Now there are 2 possible
I need to intersect two tables based on a column,in both tables. Here's my
Edit: Just wanted to make the question I have more clear. I pretty much
I have question about try, catch and finally in Java. Consider the following scenario:
I'm having trouble with this PHP script where I get the error Fatal error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.