0

Accessing my database mysql server using my local ip address

<?php
    $col1='customerID';
    $col2='state';
    $conn = mysqli_connect('localhost','root','');
    $db = mysqli_select_db($conn,'dsuclass_gopi595');
    $sql = "select $col1,$col2 from customers";
    $result = mysqli_query($conn,$sql);
    echo "This is my local ip address 192.168.1.7";

?>
Gopibabu
  • 1
  • 4
  • somewhere [here](http://stackoverflow.com/a/31887874) around step 3 perhaps. The assumption being, you want to go the route of "Remote Connections" – Drew Jul 16 '16 at 22:32
  • Possible duplicate of [MySQL connection not working](http://stackoverflow.com/questions/31887820/mysql-connection-not-working) – Drew Jul 16 '16 at 22:41
  • could be just dupe-hammered to the above – Drew Jul 16 '16 at 22:42

1 Answers1

0
Community
  • 1
  • 1
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335