Can't connect to my database

I have a problem with connecting to the database of this account: epiz_27963427 (Website for trnsfr.rf.gd)

I got this error:
Error: SQLSTATE[HY000] [1045] Access denied for user ‘root’@‘192.168.2.189’ (using password: YES)

Here’s my code:

<?php try { $db = new PDO('mysql:host=sql306.epizy.com;dbname=epiz_27963427_trnsfr', 'root', 'PASSWORD'); } catch(PDOException $e){ die('Error: '.$e->getMessage()); } ?>

I thinked about adding the MySQL user name but I don’t know where I have to put it if I had to. I have also checked other topics but haven’t find anything to solve my problem.

Welcome, pls read…

3 Likes

I have already read it but it doesn’t help me though.

Please use your actual database username, not root. It’s the same as your hosting account username, you can find it in the control panel and client area.

5 Likes

Thank you very much!
It worked, I have no more problem now.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.