How can i connect my site to the database?

Status
Not open for further replies.

lesterax

New Member
Messages
1
Reaction score
0
Points
1
Please help. I am trying to connect my website to the database i created. in the login in i encountered this error

Warning: mysqli_connect(): (28000/1045): Access denied for user 'root'@'localhost' (using password: NO) in /home/trialx21/public_html/login.php on line 9
Failed to connect to MySQL: Access denied for user 'root'@'localhost' (using password: NO)

Thanks
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Please help. I am trying to connect my website to the database
the following settings should be used:
Host/Server Name - [ localhost ]

Port - [ 3306 ] (not necessary)

Username --> Your cPanel username followed by an underscore and the MySQL username you configured in cPanel

Password --> The password that you used when creating the MySQL user

Database --> Your cPanel username followed by an underscore and the name of the database that you created in cPanel
NOTE: Free hosting accounts do not have remote MySQL access.
 
Status
Not open for further replies.
Top