I have installed WAMP Server on 192.168.1.104 System, How to connect MySql From other System Ex.: 192.168.1.5

StackOverflow https://stackoverflow.com/questions/8678039

  •  09-04-2021
  •  | 
  •  

문제

Thanks in advance.

I have Installed WAMP Server on System 4(192.168.1.104). I can Connect MySql DB from System 4 Local host.

//Code:
if (!mysql_connect('localhost','root', '')){
    die('Could not connect: ' . mysql_error());
}

The Connection is working Fine.

Now i am trying to Connect System 4 Database From Another Machine.

//Code:
if (!mysql_connect('192.168.1.104','root', '')){
    die('Could not connect: ' . mysql_error());
}

i am receiving This Error in Browser

Warning: mysql_connect() [function.mysql-connect]: Host 'Laptop' is not allowed to connect to this MySQL server in D:\xampp\htdocs\bigben_new\testDB.php on line 7 Could not connect: Host 'Laptop' is not allowed to connect to this MySQL server

Please Give a solution. and thanks in Advance.

도움이 되었습니까?

해결책

You have to allow access to your phpMyAdmin on '192.168.1.104' from '192.168.1.5' or from all 127.0.0.1

You can refer below post.

how to give access of PhpMyAdmin

다른 팁

Simple:

GRANT USAGE ON *.* TO rkaartikeyan@192.168.1.104 IDENTIFIED BY 'rkaartikeyanpasswd';
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top