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