error Database could not established

i try ti install however i got error , i have setup all necessary component so far though still i get some error saying database could not established
thanks

Hi Andrew,
Is the error that the database connection cannot be established? Could you paste the exact error message?
Regards,
George

INSTALLATION - STEP 3

A database connection could not be established. Please try again.
i have xampp installed on my windows pc, and apache, mysql are up and running, however still i can not connect , i hosted on all stuff on localhost
but mysql is running im pretty sure because i tried with different application from remote pc, it is working charm.

Is is the mysql user that you entered during intallation able to create a database?

let me share you snapshot

i have attached snapshot on mediafire please

https://www.mediafire.com/?5342o7mf7w9j8d8

http://www.mediafire.com/view/ha7ha99gpwby4dj/err.png

http://www.mediafire.com/view/sgr4x3ene9939xd/(Copy%20of)%20er.png

have you please reviewed this snapshot /

Hi Andrew,
Can you try creating a new php file to test if the problem is your MySQL user?

<?php $servername = "localhost"; $username = "andrew"; $password = "********"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "CREATE DATABASE myDBPDO"; // use exec() because no results are returned $conn->exec($sql); echo "Database created successfully
"; } catch(PDOException $e) { echo $sql . "
" . $e->getMessage(); } $conn = null; ?>

Let me know if this works. If is doesn’t then the problem is with the MySQL user.
Regards,
George

your code output is this …
Notice: Undefined variable: sql in C:\xampp\htdocs\test\index.php on line 19
SQLSTATE[HY000] [1045] Access denied for user ‘andrew’@‘localhost’ (using password: YES)

do i need to change some value on myspl file in order to avoid this issue / or is there any other way to get around it, PLZ

The error states that the user andrew cannot connect to Mysql. Can you try resetting the password for andrew in MySQL

I have updated the code so only the error is returned.

<?php $servername = "localhost"; $username = "andrew"; $password = "********"; try { $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "CREATE DATABASE myDBPDO"; // use exec() because no results are returned $conn->exec($sql); echo "Database created successfully "; } catch(PDOException $e) { $e->getMessage(); } $conn = null; ?>

updated code goes blank windows, nothing shows up on browser, not even give me either “error” it’s totally blank page

Regard
Andrew

Hi Andrew. I think the root of the problem is the mysql user. Do you have the root user and password? If so please try root user and password in the original code.

If that creates the db then you know that you need to check that you have the correct password for the user andrew aand that the user has full permission in mysql

Sorry missed the echo in the code on line 18 but original should work if db user is able to connect.

i tried with both user, still not makes sense
could you please reach me via me via teamviewer if possible
user 755 168 680
PWD 8000

regard
andrew

give me 20 mins

no problem Mate i’m work off now,

Connected via teamviewer

let me know when you are ready to start.