mysql_connect(): Can't connect to local MySQL server through

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

Moderators: Developers, Moderators

Post Reply
jeonchl
Posts: 11
Joined: Sat Nov 19, 2005 8:33 am

mysql_connect(): Can't connect to local MySQL server through

Post by jeonchl »

hi:
after i finished the cacti configuration and open in my web page
this error appear,

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339

Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.

can you help me ?

thanks!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

One example of the error is plenty.

I suggest you read the guide in my signature. Specifically the MySQL section, step 6.
jeonchl
Posts: 11
Joined: Sat Nov 19, 2005 8:33 am

Cacti config question

Post by jeonchl »

I conect mysql database in terminal command ok ,but in the web is wrong too!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

*sigh* did you follow step 6 like I suggested? Alternatively read: http://dev.mysql.com/doc/refman/5.0/en/old-client.html
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Why the heck does the "Start Param" I add disapear after I start the service? Should I be adding it somewhere else?
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Look in your event log and the error regarding the mysql service. You stopped it before adding in the start parameter, right?
jeonchl
Posts: 11
Joined: Sat Nov 19, 2005 8:33 am

Cacti config question

Post by jeonchl »

thanks your help !

i finished my config

i can start it in the web http://localhost/cacti
jeonchl
Posts: 11
Joined: Sat Nov 19, 2005 8:33 am

Cacti config question

Post by jeonchl »

mysock file location is diff

use

In –s /tmp/mysql.sock /var/lib/mysql/mysql.sock
jeonchl
Posts: 11
Joined: Sat Nov 19, 2005 8:33 am

Post by jeonchl »

Error: Save Failed


when i add new device or host to view usage png


help please !

tks!!
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

You posted twice about this failed save, read my post in your other thread.
[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]
jengstro
Cacti User
Posts: 156
Joined: Tue Nov 15, 2005 12:14 pm

Post by jengstro »

Yes. I stopped the service and added the following to the start prams...

--old-passwords

and pressed start.
[size=75]Cacti - 0.8.6h + patches
PHP - 5.1.2
ZendOptimizer - 2.6.2
FastCGI - 0.6
MySQL - 4.1.15
Cactid - 0.8.6g
rrdtool - 1.2.x
IIS6[/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests