NameSilo

[Resolved] Php post to Mysql

Spacemail by SpaceshipSpacemail by Spaceship
Watch
php post to mysql

Im having trouble connecting to my database using the code:

$link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);

Any idea why I cannot connect to the database?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
what is the error message that you receive?

solved via chat. He was using a fully qualified domain instead of localhost when connecting.
 
0
•••
Thanks for the post upon resolution. I hate looking through forums to see someone just say "SOLVED". It doesn't help anyone. These forums are archives for many problems that can be solved if everyone does what you just did.
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back