Jump to content

php can't connect to mysql remotely


Recommended Posts

Hi !!!

I'm a total newbie in PHP and Mysql and just managed to install the "LAMP suite" on my ubuntu linux.

 

The problem I have is this: I've created a small .php webpage that flawlessly connects to a mysql database locally (localhost). The problem is that the script can't connect from a remote computer to the database. The error that shows the remote computer is this:

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /opt/SERVER/apache2/htdocs/huesos_php_mysql/db_conection.php on line 6

Unable to connect to MySQL

 

Please help.

Link to comment
https://forums.phpfreaks.com/topic/64309-php-cant-connect-to-mysql-remotely/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.