griimnak
You're a slave to the money then you die
SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'reachphp_db, root, finger'
datbase.php
PHP:
<?php
/*
* ReachPHP, A private CMS written for Griimnak's site.
* Version 0.0.2
*
* Written by Griimnak
* Framework help by RastaLulz
*/
require './config.php';
// Connect and check database server
try {
$dbh = new PDO('mysql:host='.$sql["host"].';dbname='.$sql["data"].', '.$sql["user"].', '.$sql["pass"].'');
echo 'Connection was successfull.';
}
catch(PDOException $e) {
echo $e->getMessage();
}
?>
Config.php
PHP:
<?php
/*
* ReachPHP, A private CMS written for Griimnak's site.
* Version 0.0.2
*
* Written by Griimnak
* Framework help by RastaLulz
*/
// Configuration variables
/* MySQL Hostname */ $sql['host'] = 'localhost';
/* MySQL Username */ $sql['user'] = 'root';
/* MySQL Password */ $sql['pass'] = 'finger';
/* MySQL Database */ $sql['data'] = 'reachphp_db';
/* Website's path */ $web['path'] = 'http://localhost';
/* Website's name */ $web['path'] = 'Griimnak\'s site';
?>
I don't know why access is denied. the password is correct, I've tried it in phpmyadmin. :s