Jump to content

mysql_connect("IP","un","password"); quick question.


Recommended Posts

you have to contact your host and ask for the host. If you have cpanel with your host you can click on the mysql databases then look at the access and it should be in there I know mine is called "mysqlremote" not "localhost".

Ray
I'm using mb4f.info cpanel hosting.

Im in the acp it says "localhost"

i tried just putting the domain in the part and it said:

[quote]Host 'mirage.ahplace.com' is not allowed to connect to this MySQL server in /home/*****/public_html/*****/teztport.php on line 4[/quote]

when i tried access it from another host.

[code]
<?php


mysql_connect("www.MYSITE.com","nemo_testport","*******");
mysql_select_db("nemo_testport");


$test = mysql_query("SELECT * FROM test ORDER BY id DESC");

while($thiz = mysql_fetch_array($test)){

echo $thiz['id']." : ".$thiz['keyz']."<br />";
}
?>
[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.