Jump to content

connecting to database


kv79

Recommended Posts

I don't know what you're missing. There are now 2 examples of mysql_connect in this thread, one posted by you, and a link to the mysql_connect reference page that has more examples on it and more links to other pages with even more examples.

Link to comment
Share on other sites

But JSG posted exactly what you should use. What more can you want?

$con = mysql_connect("the-address-of-the-server-with-your-database-on-it.com","dani","dani");

Link to comment
Share on other sites

I said that i want to connect to my friend database and my friend have no domain .Synook -> That what he wrote mean that I must have .com domain . If i typed an public address of server like this "80.242.118.7:3306" will not let me go in database . You should try .And i can connect only if i typed like this "localhost" or "localhost:3306"Thank you for your effort of trying to help me .

Link to comment
Share on other sites

I said that i want to connect to my friend database and my friend have no domain .
No you did not say that, you never mentioned no domain. Scroll up and look. If you don't have a domain then you access by IP address.
"80.242.118.7:3306" will not let me go in database .
You don't include the port with the IP. The mysql_connect function automatically connects on port 3306, you don't need to tell it to. Just use 80.242.118.7.If you want help from people you need to give them the information they need to help you. No one here could have guessed that you were trying to connect to a server by IP and using the port number on the end. When you ask a question, post the code you're using that is wrong so we can see what you're trying to do. You should have posted what you posted above first.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...