Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
**** PHP
#1
Code:
function load_ad()
{
mysql_connect("69.175.121.66","roperson_a","pass123");
mysql_select_db("roperson_wp");
$ad_query=mysql_query("SELECT * FROM Stats2");
while ($row=mysql_fetch_array($ad_query))
{
$ad_num=$row["ad_num"];
}
$ad_query=mysql_query("SELECT * FROM Ads2 WHERE ID='".rand(17,$ad_num)."'");
while ($row=mysql_fetch_array($ad_query))
{
echo "<div align='center'><a href='$row[link]'><img id='round' src='".$row["src"]."' alt='[Ad]' width='728' height='90'/></a></div>";
}
}
load_ad();
**** PHP Wrote:Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110 in /home/vnetwork/public_html/api.php on line 124

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'vnetwork'@'localhost' (using password: NO) in /home/vnetwork/public_html/api.php on line 125

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/vnetwork/public_html/api.php on line 125

Warning: mysql_query() [function.mysql-query]: Access denied for user 'vnetwork'@'localhost' (using password: NO) in /home/vnetwork/public_html/api.php on line 126

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/vnetwork/public_html/api.php on line 126

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/vnetwork/public_html/api.php on line 127

Warning: mysql_query() [function.mysql-query]: Access denied for user 'vnetwork'@'localhost' (using password: NO) in /home/vnetwork/public_html/api.php on line 131

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/vnetwork/public_html/api.php on line 131

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/vnetwork/public_html/api.php on line 132
Reply
#2
(09-06-2011, 07:39 PM)roperson Wrote: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110 in /home/vnetwork/public_html/api.php on line 124

Sounds like your MySQL server is down/configured wrong, or you put in the wrong IP address. That should not normally happen.
Reply
#3
It's all correct.

The access in Remote MySQl reads '%' which should allow everything.

The host is definitely correct.
Reply
#4
Jacob_ is correct. Instead of your IP put locahost.
Reply
#5
NO YOU FOOL!

I'm testing an ad system I' making, and it requires Remote MySQL!

THINK!!!!
Reply
#6
Why do you need remote MySQL? It's usually not a good idea to do that unless the MySQL server is on the same LAN as the web server.
Reply
#7
Because I'm trying to make an advertizing system, like googles.


All that user can do is select data, nothing else.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)