Pieter Lategan Posted July 17, 2011 Share Posted July 17, 2011 Hi I have a problem , I get this error Can't connect to MySQL server on 'localhost' (10061). I dont know where to look for the username and password of my local host. Can someone help me regarding this , because I cant connet to the database. Pieter Quote Link to comment https://forums.phpfreaks.com/topic/242176-cant-connect-to-mysql-server-on-localhost-10061/ Share on other sites More sharing options...
robert_gsfame Posted July 17, 2011 Share Posted July 17, 2011 are you sure for the script? $localhost="localhost"; $username="your_username"; $password="your_password"; $database="database_name"; mysql_connect($localhost,$username.$password); mysql_select_db($database); Quote Link to comment https://forums.phpfreaks.com/topic/242176-cant-connect-to-mysql-server-on-localhost-10061/#findComment-1243673 Share on other sites More sharing options...
robert_gsfame Posted July 17, 2011 Share Posted July 17, 2011 if nothing wrong with it then just set privileges in localhost Quote Link to comment https://forums.phpfreaks.com/topic/242176-cant-connect-to-mysql-server-on-localhost-10061/#findComment-1243676 Share on other sites More sharing options...
Pieter Lategan Posted July 17, 2011 Author Share Posted July 17, 2011 Hi where do I set it? Quote Link to comment https://forums.phpfreaks.com/topic/242176-cant-connect-to-mysql-server-on-localhost-10061/#findComment-1243689 Share on other sites More sharing options...
robert_gsfame Posted July 17, 2011 Share Posted July 17, 2011 set it up from your database. choose privileges and create your username and password. Quote Link to comment https://forums.phpfreaks.com/topic/242176-cant-connect-to-mysql-server-on-localhost-10061/#findComment-1243749 Share on other sites More sharing options...
dcro2 Posted July 19, 2011 Share Posted July 19, 2011 Please provide more info like your host, how you created this database or if you have access to phpMyAdmin. Have you even set up a database? Quote Link to comment https://forums.phpfreaks.com/topic/242176-cant-connect-to-mysql-server-on-localhost-10061/#findComment-1244420 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.