Post by zikjohnny » Sat Jan 26, 2013 4:15 pm

Hello,

I am getting an error message like this on my error log :

2013-01-26 8:02:02 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM language WHERE status = '1' in /home/a2496201/public_html/system/database/mysql.php on line 49

I am using Opencart Version 1.5.4. Please let me know the solution asap.

Thanks

Newbie

Posts

Joined
Sat Jan 26, 2013 4:05 pm

Post by labeshops » Sun Jan 27, 2013 11:05 pm

Sounds like a hosting issue. Mysql is controlled by your host, not by opencart itself. Could have been a temporary issue as hosting companies do restart servers at various times.

Running Opencart v3.0.3.2 with multi-stores from https://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by JNeuhoff » Mon Jan 28, 2013 1:44 am

zikjohnny wrote:Hello,

I am getting an error message like this on my error log :

2013-01-26 8:02:02 - PHP Notice: Error: MySQL server has gone away<br />Error No: 2006<br />SELECT * FROM language WHERE status = '1' in /home/a2496201/public_html/system/database/mysql.php on line 49

I am using Opencart Version 1.5.4. Please let me know the solution asap.

Thanks
This could also be a timeout issue when the server never gets the result from a MySQL call because the process has stalled. The latter can happen because the automatic currency update when in the admin backend, which calls the external http://download.finance.yahoo.com/d/quotes.csv. Disable the automatic currency update at System > Settings > Local > Auto Update Currency and then try again.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by zikjohnny » Tue Apr 09, 2013 8:55 pm

Thanks all for your valuable help :)

Newbie

Posts

Joined
Sat Jan 26, 2013 4:05 pm

Post by butte » Wed Apr 10, 2013 8:25 am

The last time I recall our seeing a database server having gone poof, from symptoms the solution was very obvious, to get a new host.

What is your host?

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by zailin » Wed Dec 11, 2013 11:16 am

Hi,
I got the similar problem (just different file). My opencart version is 1.5.4

Notice: Error: MySQL server has gone away
Error No: 2006
UPDATE op_currency SET value = '1.00000', date_modified = '2013-12-11 02:32:51' WHERE code = 'MYR' in /home/mydomain/public_html/system/database/mysql.php on line 49

As I read JNeuhoff said:
This could also be a timeout issue when the server never gets the result from a MySQL call because the process has stalled. The latter can happen because the automatic currency update when in the admin backend, which calls the external http://download.finance.yahoo.com/d/quotes.csv. Disable the automatic currency update at System > Settings > Local > Auto Update Currency and then try again.
SOLUTION I FOUND:
I could not log in into the dashboard to disable the auto update currency (it throws the error when I log in)
So what I do is I go to phpMyAdmin, find the database for setting
If your table prefix is oc_ then find oc_setting
find this line from the table config_currency_auto
(It will be a long list, so maybe it will be on third of fourth page, just click the arrow- Mine is on fourth page of the list)

where the key is : config_currency_auto --> change the value from 1 to 0.

Refresh your dashboard and the errors resolved. Hope this helps!

Newbie

Posts

Joined
Thu Aug 01, 2013 2:14 pm

Post by greuceanu » Mon Jul 14, 2014 12:43 am

Hello guys,
I'm sorry I'm bumping an old post but you really saved my day after 72hours of fighting with the hosting company because of this error.
Thank you a lot!!!

For others in the same situation -->

The problem as I see it is indeed because of the damn update currency file that JNeuhoff said earlier that it calls the csv from yahoo finance. But why it created an error after 1 year of no problems in my case, is because the hosting company blocked the mysql server for international connections due to a flood problem. So if you get this error talk to your hosting company and see if they have applied any international restrictions for the mysql server, and also go to phpmyadmin and do what zailin said and it will work.

Good luck

OC rules -> Cheri Bijou


Newbie

Posts

Joined
Tue Nov 12, 2013 10:18 pm

Post by harrypawar » Sun Oct 09, 2016 1:44 pm

Thanks zailin.

I was not able to login in admin because of this exception. Your suggestion related to setting 'config_currency_auto' to 0 in 'oc_setting' fixed the issue for now.
However, for longer term fix, I will work with my hosting provider.

Thanks a ton.

Newbie

Posts

Joined
Sun Oct 09, 2016 1:41 pm

Post by zaidanmir » Wed Jul 15, 2020 10:16 pm

Warning: PDO::__construct(): MySQL server has gone away

I have a same error with my freshly installed version of open cart, I cant login to admin panel , it shows the same error, please help

Newbie

Posts

Joined
Tue Jul 14, 2020 11:00 pm


Post by ADD Creative » Wed Jul 15, 2020 11:36 pm

Contact your host, it a database connection issue.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 23 guests