-1

I want to connect to database, which is located on computer A from computer B. I tried everything what is posted in internet, nothing helped. I don't know what is wrong with that. please help me if u can ((

  • Do some basic networking troubleshooting to make sure you can make a TCP connection to the SQL port on the target machine. If that works, make sure you have the correct access privileges in the target database from the client machine. – Colin vH Nov 29 '14 at 16:57
  • 1
    What have your tired? Are we supposed to guess? What issues did you encounter? Post a concrete example and the exact errors you see when you run it. Make sure it's an SSCCE and not a code dump. – Boris the Spider Nov 29 '14 at 16:59

1 Answers1

0

Let's say this was your connection part of your script.

$con = mysqli_connect("localhost","database_user","my_password","animals");

Be sure to change the "localhost" to the correct IP/network address of computer A.

You may need to port forward on computer A if both computers are not on the same network too...

But if they aren't on the same network then why bother with all that? I'd recommend getting some real web hosting and it comes very cheap! Even free ones offer free MySQL databases just not with remote access.

ProEvilz
  • 5,310
  • 9
  • 44
  • 74