MyBB Community Forums

Full Version: SQL error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am getting this error now when i go to my forums

From researching all i see is it means crappy host. Our host is quite good, and never had any problems for years. It is through digital ocean
It doesn't mean a crappy host, necessarily, it just means there's a mis-config somewhere. Contact your host, and ask for the right information to connect to their server
sock existed
metulburr /var/run/mysqld $ ls
mysqld.pid  mysqld.sock


this seemed to of fixed it

sudo /etc/init.d/mysql restart
but why does this happen? And how to stop it. The previous forum we had with PhpBB had this happen to the admins all the time.
Ahh you're on a VPS. You need to articulate that in the article.

Basically sometimes the SQL sock doesn't flag as "Hi, I'm here". I don't know why, but yeah; reboot or restart the service.
(2016-11-16, 12:32 AM)Ben Cousins Wrote: [ -> ]Ahh you're on a VPS. You need to articulate that in the article.

Basically sometimes the SQL sock doesn't flag as "Hi, I'm here". I don't know why, but yeah; reboot or restart the service.

Would it matter whether it was a VPS or a home server?

So your basically saying that this is normal? Is this how all forums handle this situation? It seems kinda like a hack that should not have this problem. That something is mis-configured.
(2016-11-16, 12:40 AM)metulburr Wrote: [ -> ]
(2016-11-16, 12:32 AM)Ben Cousins Wrote: [ -> ]Ahh you're on a VPS. You need to articulate that in the article.

Basically sometimes the SQL sock doesn't flag as "Hi, I'm here". I don't know why, but yeah; reboot or restart the service.

Would it matter whether it was a VPS or a home server?

Yes; because if it's shared hosting, it's the hosts problem; not yours.

(2016-11-16, 12:40 AM)metulburr Wrote: [ -> ]So your basically saying that this is normal? Is this how all forums handle this situation? It seems kinda like a hack that should not have this problem. That something is mis-configured.

Yes; it's a MySQL issue. IE: not MyBB. Restart of the service alway fixes the issue. Resets the connection and socket
(2016-11-16, 01:02 AM)Ben Cousins Wrote: [ -> ]Yes; it's a MySQL issue.

Restart of the service alway fixes the issue. Resets the connection and socket

So that means any forum using mysql probably has a cron job up restarting mysql if they dont want to have down time?

Ahh, i didnt even know shared hosting exists then.  Smile Ive always used VPS or a tower at my home
(2016-11-16, 12:32 AM)Ben Cousins Wrote: [ -> ]Ahh you're on a VPS. You need to articulate that in the article.

Basically sometimes the SQL sock doesn't flag as "Hi, I'm here". I don't know why, but yeah; reboot or restart the service.
Do you mean Thread?

(2016-11-16, 01:12 AM)metulburr Wrote: [ -> ]
(2016-11-16, 01:02 AM)Ben Cousins Wrote: [ -> ]Yes; it's a MySQL issue.

Restart of the service alway fixes the issue. Resets the connection and socket

So that means any forum using mysql probably has a cron job up restarting mysql if they dont want to have down time?

Actually the issue with MySQL is there is a "table_cache" that stores a ton of queries that have been generated by other users, and thus it creates less memory for the database. Hence the 2002. It's like in computers, when you restart you reset the Rams cache. 

I'd suggest trying a "show status" on your mysql console.

If needed edit your my.cnf file in /etc/mysql/my.cnf

Modify the following within there: "Key_Buffer_size" and "Query_Cache_Size" This will allow more to be indexed and more to be stored in ram. If your capping on ram, try increasing your swap file.
(2016-11-16, 01:12 AM)VoIP Wrote: [ -> ]
(2016-11-16, 12:32 AM)Ben Cousins Wrote: [ -> ]Ahh you're on a VPS. You need to articulate that in the article.

Basically sometimes the SQL sock doesn't flag as "Hi, I'm here". I don't know why, but yeah; reboot or restart the service.
Do you mean Thread?

Probably. Mind is in thirty places at the moment.

(2016-11-16, 01:12 AM)VoIP Wrote: [ -> ]
(2016-11-16, 01:12 AM)metulburr Wrote: [ -> ]
(2016-11-16, 01:02 AM)Ben Cousins Wrote: [ -> ]Yes; it's a MySQL issue.

Restart of the service alway fixes the issue. Resets the connection and socket

So that means any forum using mysql probably has a cron job up restarting mysql if they dont want to have down time?

Actually the issue with MySQL is there is a "table_cache" that stores a ton of queries that have been generated by other users, and thus it creates less memory for the database. Hence the 2002. It's like in computers, when you restart you reset the Rams cache. 

I'd suggest trying a "show status" on your mysql console.

If needed edit your my.cnf file in /etc/mysql/my.cnf

Modify the following within there: "Key_Buffer_size" and "Query_Cache_Size" This will allow more to be indexed and more to be stored in ram. If your capping on ram, try increasing your swap file.

:O

Socket errors are nothing to do with *any* of that. It's that the service just hasn't started right. Restart. Fixed.
Quote:Socket errors are nothing to do with *any* of that. It's that the service just hasn't started right. Restart. Fixed.

even when it reoccurs over and over? It doesnt happen when i jsut start mysql, it repetitively occurs throughout regular use.
Pages: 1 2