Can't connect to DB -- Config_local.inc looks fine

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
ChiLyn
Regular
Posts: 10
Joined: Wed Apr 25, 2007 7:32 am

Can't connect to DB -- Config_local.inc looks fine

Post by ChiLyn »

Hi there,

I am getting an error which was discussed earlier on the forums and fixed by correcting username and password in the serendipity_config_local.inc.php -- problem is, my username, password and DB host look fine.

The error is as follows:

Code: Select all

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'chilyn'@'IPADDRESS' (using password: YES) in /home/content/c/h/i/chilyn/html/babyblog/include/db/mysql.inc.php on line 270

Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/c/h/i/chilyn/html/babyblog/include/db/mysql.inc.php on line 271

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/content/c/h/i/chilyn/html/babyblog/include/db/mysql.inc.php on line 271

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/content/c/h/i/chilyn/html/babyblog/include/db/mysql.inc.php on line 281

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/content/c/h/i/chilyn/html/babyblog/include/db/mysql.inc.php on line 281
serendipity error: unable to connect to database - exiting.
I have tried hard cache clear in the browser and other browsers, to no effect.

The serendipity_config_local.inc.php reads as follows:

Code: Select all

<?php
	/*
	  Serendipity configuration file
	  Written on Wed, 09 Dec 2009 02:16:12 -0700
	*/

	$serendipity['versionInstalled']  = '1.2';
	$serendipity['dbName']            = 'mys9y';
	$serendipity['dbPrefix']          = 's9y_';
	$serendipity['dbHost']            = 'PROPER DB NAME';
	$serendipity['dbUser']            = 'chilyn';
	$serendipity['dbPass']            = 'PROPER PASSWORD';
	$serendipity['dbType']            = 'mysql';
	$serendipity['dbPersistent']      = false;
	$serendipity['dbCharset']         = 'utf8';

	// End of Serendipity configuration file
	// You can place your own special variables after here:

?>
I was attempting to open up my RSS feed to display the full posts including Extended Body and was following a tutorial that advised the following edits to the rss.php file:

"find this line: serendipity_printEntries_rss($entries, $version, $comments, $metadata['fullFeed'], $metadata['showMail']);

before the line add: $metadata['fullFeed'] = true;"

The error happened directly after saving the changes, but did not clear when I reverted to the original file.

Any insight would be great! First in the DB connection issue, but also in the RSS/extended body issue if you can get to it.

Thanks!

chilyn
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Can't connect to DB -- Config_local.inc looks fine

Post by garvinhicking »

Hi!

The error definitely sounds like access denied to the database; it would be unrelated to your other changes. Can you try another tool like phpmyadmin with the same username/password etc?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ChiLyn
Regular
Posts: 10
Joined: Wed Apr 25, 2007 7:32 am

Re: Can't connect to DB -- Config_local.inc looks fine

Post by ChiLyn »

I will play with phpmyadmin straight away -- do you have any clue why it would have happened though? The site has been rock solid for 2 years.
ChiLyn
Regular
Posts: 10
Joined: Wed Apr 25, 2007 7:32 am

Re: Can't connect to DB -- Config_local.inc looks fine

Post by ChiLyn »

Problem solved -- not sure how it happened exactly, but it works now.

On to my other question..... DO you have any idea how to set up the RSS feed/exporter to show the extended body of entries? I tried finding a plugin or a hack with no luck.

Thanks!!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Can't connect to DB -- Config_local.inc looks fine

Post by garvinhicking »

Hi!

Actually the syndication plugin has a config option for "FullFeed" that you can enable?! You are running a recent s9y version? Or are you running 1.2? In that case, you need to upgrade to get the new option.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ChiLyn
Regular
Posts: 10
Joined: Wed Apr 25, 2007 7:32 am

Re: Can't connect to DB -- Config_local.inc looks fine

Post by ChiLyn »

Running 1.2, I believe.... Hopefully upgrading will be painless. :shock:

Thanks for your help, Mr. Hicking! :D
Post Reply