PDA

View Full Version : (fixed) : Error description: mysql_connect(): Can't connect to local MySQL server


twilighthush
Sun 13th Aug '06, 9:35pm
This is the error message I receive:

Attempting to attach to database

Error description: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46) /testforum/includes/class_core.php on line 271

The database has failed to connect because you do not have permission to connect to the server. Please confirm the values entered in the 'includes/config.php' file.

-----

I'm not sure why this occurs. I'm currently installing vBulletin for the very first time in a test forum on my website, and I can't seem to get it to work. I'm trying to upgrade from phpBB. I went into phpMyAdmin and created a new database, but I don't know why it doesnt seem to work.

Can anyone please share some insight? I edited the config file as follows:


// ****** DATABASE TYPE ******
// This is the type of the database server on which your vBulletin database will be located.
// Valid options are mysql and mysqli, for slave support add _slave. Try to use mysqli if you are using PHP 5 and MySQL 4.1+
$config['Database']['dbtype'] = 'mysql';
// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$config['Database']['dbname'] = 'vbulletin';
// ****** TABLE PREFIX ******
// Prefix that your vBulletin tables have in the database.
$config['Database']['tableprefix'] = 'vbulletin_';

============
EDIT:I can't seem to delete this post, so I'll just post how I resolved this issue here.It was pretty simple, I just replaced localhost with mysql and voila. It worked.