ketchumdev Posted March 7, 2011 Share Posted March 7, 2011 The settings in my connections files don’t mesh with what my online database requires. Godaddy, shared Linux. This is the page: http://bocce.tongie.me/add_user.php Here is first of the two warnings my page generates: Warning: mysql_connect() : Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) in /home/content/86/7345486/html/bocce/connections/ketchumdevwrite.php on line 9 Here is one of my connection files: <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_ketchumdevwrite = "localhost"; $database_ketchumdevwrite = "bocce"; $username_ketchumdevwrite = "ketchumdevwrite"; $password_ketchumdevwrite = "****"; $ketchumdevwrite = mysql_pconnect($hostname_ketchumdevwrite, $username_ketchumdevwrite, $password_ketchumdevwrite) or trigger_error(mysql_error(),E_USER_ERROR); ?> Line 9 is the last one, just before the close. These are the settings for my local test server. I have no trouble accessing the online database using the Starfield Technologies interface, so this seems like it should be easy, but I am having no luck. Where can I find the correct settings to connect to my online database? Thanks to everyone. Quote Link to comment https://forums.phpfreaks.com/topic/229875-warning-cant-connect-to-local-mysql-server-through-socket/ Share on other sites More sharing options...
ketchumdev Posted March 7, 2011 Author Share Posted March 7, 2011 Solved, Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/229875-warning-cant-connect-to-local-mysql-server-through-socket/#findComment-1183989 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.