I have two device on my network LB (192.168.1.10
) and RP1 (192.168.0.20
) I am wanting all the MySQL stuff to be hosted on the LB and all the web stuff to be hosted on the RP1.
I have installed mysql-server-5.5
on both devices. But when I perform the command:
$con=mysqli_connect("192.168.1.10","foo","password","max");
On the web page I get the error:
Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on '192.168.1.10' (111) in /var/www/example.info/public_html/submit.php on line 6
And obviously when I try localhost
(replacement for "192.168.1.10" in the snippet above) I get the error:
Warning: mysqli_connect(): (28000/1045): Access denied for user 'max'@'localhost' (using password: YES) in /var/www/example.info/public_html/submit.php on line 6
I have also tried:
$mysql --host=192.168.1.10
On the RP1 and I get the error:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.10' (111)