Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialbow seel
231 PointsLocal Server Error
I installed xampp server on my computer and when I try to open phpmyadmin through that its shows this type of error. Please someone help me to short out this problem
Error MySQL said: Documentation
2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).
mysqli_real_connect(): (HY000/2002): No such file or directory Connection for controluser as defined in your configuration failed. mysqli_real_connect(): (HY000/2002): No such file or directory
4 Answers
bow seel
231 PointsYes sir When I start Apache server it starts but when I try to start mysql server it says starting then automatically stops
Dave StSomeWhere
19,870 PointsWhat OS are you running?
The most common error is that something else is listening on port 3306 (the default MySQL port).
Have you checked the logs in your control panel (click the show/hide from the task icon) - and what is the error message
bow seel
231 PointsThanks for your reply. Sir I am currently on Linux my mysql port is configured as 3306 what can I do in this case sir please help me I have reinstalled Linux for 2 times too but issue not solved yet. When I do fresh Install it shows no errors but after installing some essential softwares like atom, chrome, sublime etc the errors occurs. please help
Dave StSomeWhere
19,870 PointsAre you using Ubuntu 16.04 or some other dist?
XAMPP is not necessary with Linux - but you can still use - did you check the control panel and error log? Need to know the error before we can fix.
bow seel
231 PointsYes sir I am using Ubuntu 16.04 I have previously installed lamp too but same error occurs I think other software might causing the mysql server but unable to find out which one is that. Sir I even search on stack overflow and do as others say but not working fine.
Dave StSomeWhere
19,870 PointsTry sudo netstat -tlpn to see what is currently using 3306 - You should see a line like:
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1081/mysqld
Have you followed the Official Ubuntu LAMP Guide Probably would be best to remove XAMPP and follow above (much easier).
Of course, you need to find your error logs - otherwise you'll just get frustrated, always start with the error log - it will tell you what the problem is so that you can resolve - looks like xampp does not turn on error logging by default as per below link.
Here's another thread that might help - Ubuntu XAMPP MySQL
bow seel
231 Pointsthanks sir
Dave StSomeWhere
19,870 PointsDave StSomeWhere
19,870 Pointsdid you start the apache and mysql servers?