PDA

View Full Version : [ANSWERED!] MySQL will not connect -- and yes, info is correct.


periwinkelle
08-03-2010, 10:32 AM
I can't get mysql to connect to my database. I have installed php programs before [phpbb3 in particular, as well as tiki wiki] with absolutely no problems. I know for a fact that my host, password, user, and database are correct, as I have used the same settings in the past. However, to my frustration, nothing I do will make the installer connect to my database:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'usergoeshere'@'localhost' (using password: YES) in /placeholdertext/clickable/inc/functions.php on line 13
Error connecting to MySQL

I originally set up the database and connected the user by hand, since I'm familiar with MySQL. Then I used the wizard. Then I used the wizard again to set up a new database, and that didn't work either.

I see people repeatedly suggesting that people with this same problem 'put the correct username and password in config.php'. However, my config.php file is entirely blank. I suspect this could be the issue, but how am I supposed to fix this? what should be in config.php? my installer isn't writing to it [but yes, it is CHMODed to 777]...

Any and all help appreciated.

PokePets
08-04-2010, 03:14 AM
Config.php;
<?php
//Rusnak PHP Adoptables Site Configuration File

$dbhost = ' YOUR HOST'; //DB Hostname
$dbuser = ' DATABASE USER'; //DB User
$dbpass = 'DATABASE PASSWORD'; //DB Password
$dbname = ' DATABASE NAME'; //Your database name
$domain = ' DOMAIN'; //Your domain name (No http, www or . )
$scriptpath = '/FOLDER'; //The folder you installed this script in
$prefix = 'adopts_';

?>
:D

periwinkelle
08-04-2010, 08:18 AM
THANKS! I copy + pasted, edited, and it seems to be working now.

PokePets
08-04-2010, 10:53 AM
Nice :D!