fruzzgle Posted May 30, 2006 Share Posted May 30, 2006 I'm a begginer and am taking a tutorial on it. I just started the MySQL connect. Here's my code:[code]<?phpmysql_connect("localhost", "admin", "1admin") or die(mysql_error());echo "Connected to MySQL<br/>";?>[/code] I test it and get this-Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)I have no Idea what this means? Link to comment https://forums.phpfreaks.com/topic/10743-connecting-to-mysql/ Share on other sites More sharing options...
fenway Posted May 30, 2006 Share Posted May 30, 2006 It means you need to consult [a href=\"http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html\" target=\"_blank\"]this refman page[/a] to see which one of the many known problems you've encountered. Link to comment https://forums.phpfreaks.com/topic/10743-connecting-to-mysql/#findComment-40173 Share on other sites More sharing options...
vishi83 Posted May 31, 2006 Share Posted May 31, 2006 [!--fonto:Times New Roman--][span style=\"font-family:Times New Roman\"][!--/fonto--] Before executing your php script, make sure you're able to get into the mysql prompt from the terminal.Because you have a problem with mysql connection.Can you tell me how you connect to the mysql ?Thanks. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] [!--fontc--][/span][!--/fontc--] Link to comment https://forums.phpfreaks.com/topic/10743-connecting-to-mysql/#findComment-40543 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.