The PHP+MYSQL link error (hire server + network database)

Hire a PHP server +MYsql database in 72bz today
Upload the files to the PHP server, you cannot link MYsql database, customer service said that everything is normal. But it is not even, then directly to ignore me
Database link statement as follows:
$hostname = ""; //Host name
$dbuser = "table2013"; //User name
$password = "1981xxxx"; //Cipher
$dbname ="table2013";//The database name
$server =mysql_connect($hostname,$dbuser,$password);
$db = mysql_select_db($dbname,$server);

Started by Louisa at November 02, 2016 - 1:33 AM

I have a look the database link statement you have the question, this is seen a ghost. I have been using the MSSQL database, just recently had no SQLSERVER database, so we use the MySQL database. The customer service database of all normal, the web server of all normal. But I'm a web server is not a database link. I almost died depressed.

Posted by Louisa at November 11, 2016 - 2:24 AM

The supplier is not possible to provide remote database connection
So you
$hostname = ""; //Host name
Is wrong! Only
$hostname = "localhost"; //Host name

Posted by Noah at November 18, 2016 - 2:48 AM

If I were in the local server, using a remote database, you can use:
$hostname = ""; //Host name
In my case I have a server, but less of a database, so rented a database server, but today the first with the local server tried not using a remote database server
And then rented a remote PHP server, or can not use the database server.

Posted by Louisa at November 26, 2016 - 3:48 AM

You install a MySQL not to go?
For remote MySQL? Slow and do not say, that how much ah

Posted by Noah at November 29, 2016 - 4:27 AM

I want to provide services, although one day.

Posted by Louisa at December 07, 2016 - 5:19 AM

Moderators, can add my QQ, 199415538 guide me, the database connection to localhost or even not

Posted by Louisa at December 19, 2016 - 5:48 AM

Your statement does not have a problem, the other is the IP address is there (at least I used)!
To estimate or username and password or IP address of the problem?

You can ask the database management of web address (generally), you use the username and password to see if you could login
Or install a MySQL desktop software (such as Navicat for MySQL), then the remote connection try!

Posted by Lucinda at December 29, 2016 - 6:27 AM

A lot of times are network problems, especially small service providers, their network did not support line, three line network, your network is not even on the other side of the database.
For example you are Unicom network cannot connect to each other, but behind you to your friends or family (for Telecom) can be linked to the!

Posted by Lucinda at January 08, 2017 - 8:05 AM

Thank you for help, the question now is, I even the other server is normal, even the other database is normal, but the other is not the other database servers. The other said, two things are no problem. My database link statement there is no problem. I was stupid, where is the question of whether.

Posted by Louisa at January 10, 2017 - 6:44 AM

Thanks for the B class, there is no network problems, because it is a supporting server and database space service providers. Is the overall. Even IP.

Posted by Louisa at January 11, 2017 - 7:30 AM