Mamp Error Code 2002
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings /applications/mamp/tmp/mysql/mysql.sock missing and policies of this site About Us Learn more about Stack can't connect to local mysql server through socket '/applications/mamp/tmp/mysql/mysql.sock' (2) Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
Mamp Mysql Not Starting
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them;
Error 2002 Hy000 Can T Connect To Local Mysql Server Through Socket Tmp Mysql Sock 2 Mac
it only takes a minute: Sign up Error #2002 Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) up vote 5 down vote favorite I'm running MAMP. It has been working fine up until yesterday. I haven't been able to find anything that helps so far. But here is my problem: As the title states I'm receiving the following uninstall mamp error: error #2002 "Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)" which, I have noticed, seems to be a pretty common error when I search for it. Anyway, When I cd to tmp/mysql and ls -laxo the only thing that shows up besides the ./ and ../ directories is .dummy (I have no idea what that is, but I have a hunch it's not the source of my problem). That is where the mysql.sock file is suppose to be located. Does anyone know of a way to fix this. Maybe I need to create the mysql.sock file but I wouldn't know what to put in it. mysql mamp mysql-error-2002 share|improve this question edited Mar 31 '13 at 16:47 Jean 6,08553254 asked Jun 19 '12 at 17:01 Brandon Beeler 2613 did you ever resolve this? –John Blythe Nov 14 '12 at 17:57 1 It's a been a while since I had this issue. But I believed I was able to fix this by running the command "killall mysqld" in the terminal. Hope that
connect to local MySQL server through socket '/tmp/mysql.sock' (2) 26 Nov I instaled MAMP and it worked great. However, when I tried to access mysql from the shell I was getting $
Mamp Download
mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect mamp pro to local MySQL server through socket '/tmp/mysql.sock' (2)
However, using a full path to MAMP binary worked. $ /Applications/MAMP/Library/bin/mysql localhost/phpmyadmin -u root -p
MAMP's mysql works with another socket file which is located at /Applications/MAMP/tmp/mysql/mysql.sock All you have to do is: sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock UPDATE: As it turns out the http://stackoverflow.com/questions/11105796/error-2002-cant-connect-to-local-mysql-server-through-socket-applications-ma above soft link gets erased by the system, so you need to run the command every once in a while. At one point it got too frustrating so I figured out a permanent way to take care of this problem. Open /etc/my.cnf and add/edit these lines: [mysqld]
socket=/Applications/MAMP/tmp/mysql/mysql.sock
[client]
socket=/Applications/MAMP/tmp/mysql/mysql.sock Instead of telling MAMP which socket file to use, you are instructing the mysql client https://boriskuzmanovic.wordpress.com/2008/11/26/mamp-error-2002-hy000-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock-2/ to use MAMP's default socket. Let me know if this works for you. Share this:TweetEmailLike this:Like Loading... Related 12 Comments Posted by boriskuzmanovic on November 26, 2008 in Mac OS Tags: mamp, mysql ← How to fix /tmp 100% usageproblems Coda books with custom images for Code Igniter, MySQL,PHP… → 12 responses to “MAMP: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)” Eb October 19, 2011 at 8:24 pm Hi, I am a complete novice and no nothing about programming but love designing using simple software. I recently installed the free version of MAMP to create a database. It was working great until I tried changing the default login and pw from "root" to something else. I was then not able to login again so I reinstall MAMP again. After reinstalling, I am able to access the Apache and do everything (change default port, open program etc). However, when I try to access the mysql using dreamweaver, I get ERROR 2002: Can't connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock' (2). I will appreciate your help and please consider it as helping a first grader Thanks Reply boriskuzmanovic Oc
as it should - until I tried to install WordPress on my MacBook. I got a database connection error very early during the WordPress installation process. So I tried to talk to the mysql server with the mysql command line tool and got http://fischerlaender.de/apple-mac/mac-os-x-trouble-with-mamp-mysql this error message: macbook:~ sf$ /Applications/MAMP/Library/bin/mysql -u root -p
Enter password:
ERROR 2002 (HY000): https://www.youtube.com/watch?v=TrgtqmINOWY Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) This was strange as the mysql server was indeed running; I could verify this by an ps command. Futhermore phpMyAdmin, as provided by MAMP, worked flawlessly. Doing some Google research told me that the problem was connected with the location of mysql.sock. Running ps -awwx | grep mysql showed, that mysqld had been connect to started by MAMP with the option --socket=/Applications/MAMP/tmp/mysql/mysql.sock, whereas the mysql tool and WordPress assume the socket file here: /tmp/mysql.sock. With this information the solution is easy: sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock This creates a symbolic link from the location expected by mysql and wordpress to the location where the socket file resides. Now I can access my mysql server with the mysql command line tool and my local WordPress installation can also talk to the database. Abgelegt in: Apple Mac connect to local • Web 2.0 86 Kommentare: » Blog Archive » Mac OS X: Trouble with MAMP MySQL | 10. Juli 2007 | 11:00 Uhr […] Mac OS X: Trouble with MAMP MySQLMAMP is for Mac what XAMPP is for windows: A very easy-to-use, but Mac-like web development solution. Everything worked out-of-the box as it should - until I tried to install WordPress on my MacBook. I got a database connection error very early during… […] I thought using a Mac was supposed to be simple? | The Social Publishing Blog | 2. September 2007 | 19:56 Uhr […] socks, sockets and sudo's - something i really don't care or want to learn. Thankfully, the fix was simple, but virtually impossible to guess or work out the solution for oneself. I thought using […] Matt | 17. September 2007 | 23:11 Uhr thanks for the help Stefan - this is really helpful! Matt | 18. September 2007 | 23:27 Uhr Can anyone tell me how the above fix can be remembered after each re-boot? at the moment i have to re-run the sudo command every time i start up the OS. Any help, or pointers greatly appreciated! Andrea | 2. Oktober 2007 | 12:00 Uhr Hi, I'm very interested about this topic. I'm a new "Mac-User" and I need to use my laptop as a local server for php pages. I have installed MAMP 1.7: everything works fine using th
Επιλέξτε τη γλώσσα σας. Κλείσιμο Μάθετε περισσότερα View this message in English Το YouTube εμφανίζεται στα Ελληνικά. Μπορείτε να αλλάξετε αυτή την προτίμηση παρακάτω. Learn more You're viewing YouTube in Greek. You can change this preference below. Κλείσιμο Ναι, θέλω να τη κρατήσω Αναίρεση Κλείσιμο Αυτό το βίντεο δεν είναι διαθέσιμο. Ουρά παρακολούθησηςΟυράΟυρά παρακολούθησηςΟυρά Κατάργηση όλωνΑποσύνδεση Φόρτωση... Ουρά παρακολούθησης Ουρά __count__/__total__ MySQL Error 2002 can't connect to local MySQL for Mac John Pelagides ΕγγραφήΕγγραφήκατεΚατάργηση εγγραφής4141 Φόρτωση... Φόρτωση... Σε λειτουργία... Προσθήκη σε... Θέλετε να το δείτε ξανά αργότερα; Συνδεθείτε για να προσθέσετε το βίντεο σε playlist. Σύνδεση Κοινή χρήση Περισσότερα Αναφορά Θέλετε να αναφέρετε το βίντεο; Συνδεθείτε για να αναφέρετε ακατάλληλο περιεχόμενο. Σύνδεση Μεταγραφή Στατιστικά στοιχεία 17.226 προβολές 21 Σας αρέσει αυτό το βίντεο; Συνδεθείτε για να μετρήσει η άποψή σας. Σύνδεση 22 4 Δεν σας αρέσει αυτό το βίντεο; Συνδεθείτε για να μετρήσει η άποψή σας. Σύνδεση 5 Φόρτωση... Φόρτωση... Μεταγραφή Δεν ήταν δυνατή η φόρτωση της διαδραστικής μεταγραφής. Φόρτωση... Φόρτωση... Η δυνατότητα αξιολόγησης είναι διαθέσιμη όταν το βίντεο είναι ενοικιασμένο. Αυτή η λειτουργία δεν είναι διαθέσιμη αυτήν τη στιγμή. Δοκιμάστε ξανά αργότερα. Ανέβηκε στις 19 Οκτ 2010ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)This is a fix fo