jazzbach Posted August 10, 2007 Share Posted August 10, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/64309-php-cant-connect-to-mysql-remotely/ Share on other sites More sharing options...
trq Posted August 10, 2007 Share Posted August 10, 2007 We need to see your call to mysql_connect(). Looks to me like your trying to connect to a local mysql server still. Quote Link to comment https://forums.phpfreaks.com/topic/64309-php-cant-connect-to-mysql-remotely/#findComment-320783 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.