gsquare567 Posted April 28, 2007 Share Posted April 28, 2007 heres the error message: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in i tried connecting using: DEFINE ('HOST', 'localhost'); DEFINE ('USER', 'root'); DEFINE ('PASSWORD', ''); DEFINE ('MYDB', 'AuthInfos'); // mysql connecting $dbc = mysql_connect(HOST, USER, PASSWORD) or DIE('Could not connect to the database: ' . mysql_error()); Link to comment https://forums.phpfreaks.com/topic/49116-moving-my-auth-script-to-a-freehostia-site/ Share on other sites More sharing options...
gsquare567 Posted April 28, 2007 Author Share Posted April 28, 2007 the site says: The correct MySQL database settings are: MySQL Host: your server name MySQL Port: 3306 MySQL Database: your database name MySQL Username: your database name MySQL Password: your database password but i thought my server name is localhost... so what is it? Link to comment https://forums.phpfreaks.com/topic/49116-moving-my-auth-script-to-a-freehostia-site/#findComment-240656 Share on other sites More sharing options...
snowdog Posted April 28, 2007 Share Posted April 28, 2007 I think it would only be localhost if the page is on the same server as the database, when it isnt it is porbably looking for 206.34.763.287 (your server address) Snowdog Link to comment https://forums.phpfreaks.com/topic/49116-moving-my-auth-script-to-a-freehostia-site/#findComment-240667 Share on other sites More sharing options...
gsquare567 Posted April 28, 2007 Author Share Posted April 28, 2007 thanks for the reply, but didnt work. Warning: mysql_connect(): Unknown MySQL Server Host '206.34.763.287' (3) in Link to comment https://forums.phpfreaks.com/topic/49116-moving-my-auth-script-to-a-freehostia-site/#findComment-240668 Share on other sites More sharing options...
snowdog Posted April 28, 2007 Share Posted April 28, 2007 I hope you didnt use the IP i threw in as an example. If you did you need to input your server IP Snowdog Link to comment https://forums.phpfreaks.com/topic/49116-moving-my-auth-script-to-a-freehostia-site/#findComment-240675 Share on other sites More sharing options...
gsquare567 Posted April 28, 2007 Author Share Posted April 28, 2007 nope, that didnt work. Link to comment https://forums.phpfreaks.com/topic/49116-moving-my-auth-script-to-a-freehostia-site/#findComment-240681 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.