Can't connect to local MySQL server trough socket ....

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
helper4cacti
Posts: 9
Joined: Wed Jul 11, 2007 11:11 am

Can't connect to local MySQL server trough socket ....

Post by helper4cacti »

In the graph tree some graph couldn't open whith next meesage in console
ERROR 2002 (HY000) Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
danathane
Cacti User
Posts: 127
Joined: Thu May 03, 2007 9:03 am

Post by danathane »

does you mysql service is active?
I had the same problem last night and it was just the service wich was activated.
helper4cacti
Posts: 9
Joined: Wed Jul 11, 2007 11:11 am

Post by helper4cacti »

Sure, I can manage it's table via webmin. And restart mysql server several times, but error still persist
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Perhaps you're facing a max_connections problem. This /etc/php.ini setting defaults to 100. You may upper it to 500. Restart mysqld and httpd to take effect
Reinhard
helper4cacti
Posts: 9
Joined: Wed Jul 11, 2007 11:11 am

Post by helper4cacti »

There is one settings in php.ini with max_connections

[FrontBase]
.....
;fbsql.max_connections = 128

But it's disabled by ; in beginnig

Could I use next string instead ?
fbsql.max_connections = 500
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

here's how to see if you've reached the maximum number of connections :

Code: Select all

mysql> show variables like '%max_connectio%';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 4000  |
+-----------------+-------+
1 row in set (0.00 sec)

mysql> show status like 'Max%';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Max_used_connections | 224   |
+----------------------+-------+
1 row in set (0.00 sec)
To change the maximum allowed connections, add this to my.cnf :

Code: Select all

set-variable = max_connections=4000
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
helper4cacti
Posts: 9
Joined: Wed Jul 11, 2007 11:11 am

Post by helper4cacti »

Thx for advice. I setup max_connections to 500

I look carefully, but I have no Max_used_connections variable...
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Doesn't look like you are using mySQL.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
helper4cacti
Posts: 9
Joined: Wed Jul 11, 2007 11:11 am

Post by helper4cacti »

Cacti Version - 0.8.6i
Plugin Architecture - 1.0
Poller Type - Cactid v
Server Info - Linux 2.6.9-55.0.2.ELsmp
Web Server - Apache/2.0.52 (CentOS)
PHP - 4.3.9
PHP Extensions - yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, mysql, snmp, eAccelerator
MySQL - 4.1.20
RRDTool - 1.2.15
SNMP - 5.1.2
Plugins
  • PHP Network Weathermap (weathermap - v0.92)
    Thresholds (thold - v0.3.0)
    Device Monitoring (monitor - v0.7)
    Network Discovery (discovery - v0.6)
    Network Tools (tools - v0.2)
    Syslog Monitoring (haloe - v0.4)
    Device Tracking (mactrack - v1.0)
    RRD Cleaner (rrdclean - v1.1)
    Update Checker (update - v0.3)
    FlowView (flowview - v0.3)
    Host Info (hostinfo - v0.1)
    Error Images (errorimage - v0.1)
    Simple Links page (links - v0.3)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please find docs concerning this issue at http://dev.mysql.com/doc/refman/4.1/en/ ... ables.html
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest