MYSQL Servername issue?

auztrax1

New Member
Messages
2
Reaction score
0
Points
1
Long short story, I am having issues with $servername = "localhost"; looks like it is not localhost or iam missing something, i tried username@x10....
 

auztrax1

New Member
Messages
2
Reaction score
0
Points
1
reference: $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
looks like it is not localhost or iam missing something

what is the issue (error) ??
###

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.
 
Top