Are you trying to:
- Use PHP to connect to a database running on another machine, from 192.168.0.2; or
- Connect to a LAMP server from a client machine with IP address 192.168.0.2, over SSL?
If 1 is the case,
mysql_connect can take "client flags" as an optional attribute, one of which is
MYSQL_CLIENT_SSL. If 2 is the case, on the other hand, and the PHP scripts are on the same machine as the MySQL server, then the problem is that PHP is connecting from
localhost, not from the IP of the client machine, so your GRANT statement would need to allow this. You could enforce the use of SSL by checking the value of
$_SERVER['HTTPS'] in the script, and redirect the client if an attempt is made to access the page over plain HTTP.