adityajoshi5
New Member
- Messages
- 3
- Reaction score
- 0
- Points
- 0
Hello
I've written this to connect mysql database thru php
$host = "radiance.x10.mx";
$user = "radiance_****";
$pass = "********";
$db = "radiance_****";
$link = mysql_connect($host, $user, $pass);
mysql_select_db($db, $link);
I recieve the following error on webpage
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /home/radiance/public_html/articles.php on line **
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/radiance/public_html/articles.php on line **
Sorry! Couldn't Link the Database
Please tell me the problem here. I do it while while still working on my computer's xampp server on localhost
-----------------------------------------
Now I've made a little change.
$host = "localhost";
$user = "radiance_****";
$pass = "********";
$db = "radiance_****";
$link = mysql_connect($host, $user, $pass);
mysql_select_db($db, $link) or die(mysql_error());
It says -
Access denied for user 'radiance_*******'@'IP.IP.IP.%' to database 'radiance_****'
Whats wrong?
I've written this to connect mysql database thru php
$host = "radiance.x10.mx";
$user = "radiance_****";
$pass = "********";
$db = "radiance_****";
$link = mysql_connect($host, $user, $pass);
mysql_select_db($db, $link);
I recieve the following error on webpage
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /home/radiance/public_html/articles.php on line **
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/radiance/public_html/articles.php on line **
Sorry! Couldn't Link the Database
Please tell me the problem here. I do it while while still working on my computer's xampp server on localhost
-----------------------------------------
Now I've made a little change.
$host = "localhost";
$user = "radiance_****";
$pass = "********";
$db = "radiance_****";
$link = mysql_connect($host, $user, $pass);
mysql_select_db($db, $link) or die(mysql_error());
It says -
Access denied for user 'radiance_*******'@'IP.IP.IP.%' to database 'radiance_****'
Whats wrong?
Last edited: