Call To Undefinded Function mysql_connect
Posted 07 March 2008 - 04:19 AM
It returns the error due to login name and password I used. I used "root" and its password. But, somehow it did not work.
I created the new user and then tried again.
It worked on this time.
Tin Aung Soe
Posted 27 May 2008 - 08:58 PM
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /data/16/1/57/83/1546246/user/1664829/htdocs/admin/functions.php on line 6
Database connectivity Error
The function in question (line 6 is the if statement):
global $host, $user, $pass, $db,$link;
if(!($link=mysql_connect($host,$user,$pass) && mysql_select_db($db)))
sprintf("Internal error %d %s",mysql_errno(),mysql_error());
Everything works fine in PHP4, its when I switched to PHP5 that I started getting errors. Any idea whats wrong?
Posted 28 May 2008 - 05:45 AM
If you manage your own server, ensure that the server is running (probably it is) on the local machine, and make sure right socket file is used. This should help with that:
If not, contact your host.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users