Mysql Error 2002 Mac
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting mac error 2002 (hy000): can't connect to local mysql server through socket '/tmp/mysql.sock' (2) ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join
Mac Can't Connect To Local Mysql Server Through Socket '/tmp/mysql.sock' (2)
the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes error the server quit without updating pid file usr local var mysql a minute: Sign up MySQL - Mac - Error 2002 - Can't connect to local… through socket up vote 4 down vote favorite I had MySQL running fine on my Mac till earlier today when I installed homebrew and also updated mysql server command not found my Path. When I try to run mysql from my ternimal window now, I get the following error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) I can't connect MySQLAdmin either. I can't even run Mysqld. The error I get when trying to run mysqld is that it can't create test file. I also tried to telnet localhost 3306 and wasn't able to connect. Any help would be appreciated as I am fairly new to Mac. mysql
Mysql Error 2002 (hy000)
mysql-error-2002 share|improve this question edited Jul 6 '11 at 16:31 OMG Ponies 199k37360417 asked May 29 '10 at 1:37 Sohrab Hejazi 527519 1 You should try asking this on superuser.com –Mitch Dempsey May 29 '10 at 1:45 What does your config file look like? Can you post the contents of your config file? The file is my.cnf and found in /etc/. When I had this problem, I renamed the config file and restarted the computer... things seemed to work better. Have you messed with the config file at all? –Hristo Jul 6 '10 at 14:35 Did any of the answers below solve your problem? If yes could you just accept one of them then? –T.Chmelevskij Oct 9 at 15:18 @T.Chmelevskij - This question is from 6 years ago. I was fairly new to stackoverflow back then and unfortunately didn't mark the appropriate answer. I don't recall which answer helped me solve my problem. I suggest start by using the answers that have received the most amount of votes by fellow users. –Sohrab Hejazi Oct 10 at 18:44 add a comment| 7 Answers 7 active oldest votes up vote 4 down vote The mysql error (2002) is caused by the fact mysqld isn't running. The error you are seeing when starting mysqld is probably a permissions issue. Try starting mysqld as root or sudo'ing the command. share|improve this answer answered Feb 26 '11 at 2:12 Paul
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of brew install mysql server this site About Us Learn more about Stack Overflow the company Business Learn error 1045 (28000): access denied for user (using password: no) more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Mac Uninstall Mysql
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; it only takes a minute: Sign up http://stackoverflow.com/questions/2933415/mysql-mac-error-2002-cant-connect-to-local-through-socket MySQL - Can't connect to local MYSQL server…ERROR 2002? up vote 0 down vote favorite Hi I've looked all over the internet to find an answer to this problem but nothing seems to work. I get the below problem when I try to log in to mysql on terminal in OSX El Capitan. The server is running. What should I do, I've spent 5 http://stackoverflow.com/questions/36654411/mysql-cant-connect-to-local-mysql-server-error-2002 hours trying to figure this out before posting this. I cannot find the my.cnf file in /etc and I'm not sure what to do with it. Someone please help. Edit: I've downloaded and installed(just double clicking - no terminal) this: When everything is installed and i go into /usr/local/mysql/bin/ and try mysql -u root -p I get the following error: This is my my.cnf file in /etc: When I do sudo /usr/local/mysql/bin/mysqld_safe I get this: df -h returns this, could it be something to do with space? mysql osx share|improve this question edited Apr 15 at 21:38 asked Apr 15 at 18:28 stanlex 113 1 Looks to me like you have installed the MySQL Client instead of MySQL Server. Can you check and report back? –Steve Moore Apr 15 at 18:35 Looks like it. Did you do yum install mysql? –upagna Apr 15 at 18:43 I went on the mysql website and downloaded MySQL Community Server and installed it the typical way by double clicking. Didn't use the terminal to install it. Any idea how to fix it. I don't mind removing M
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: NDB clusters :: Can't connect to local MySQL server New Topic Advanced Search Here's my fix... Error 2002 after Mac OSX Security Update Posted by: Jay Stolpestad () http://forums.mysql.com/read.php?25,72797,79252 Date: March 28, 2006 10:02PM An associate found this regarding the OSX security update that was released about a month ago. It got me back up and running again. Try the suggestions that are mentioned below. * The default socket location for PHP and MySQL is now the same (/var/mysql/mysql.sock). If you modified your MySQL configuration to revert to using /tmp/mysql.sock, the update process will detect that condition and create a symlink mysql server in /var/mysql so that the socket can be accessed by PHP. This is done to prevent disruption, and should be considered a temporary measure. At your earliest convenience, you should remove any socket directives from the [mysqld] and [client] sections of your MySQL config files, and allow MySQL to use its default socket location. Then you can restart MySQL; it will remove the symlink from /var/mysql, replace it with the socket, mysql error 2002 and PHP will continue to have access. In addition, to remove a barrier to seamless interaction with the Apache web server: * The MySQL Manager application now creates the /var/mysql directory (which contains the MySQL socket) with permissions that allow the web server to access it. * If that directory already exists, the update process sets the correct permissions. For self-installed MySQL If you have downloaded and installed MySQL yourself but are using the pre-installed version of PHP, note that your custom version of MySQL might be configured to use the old MySQL socket location, /tmp/mysql.sock. The version of PHP in this software update uses the newer location /var/mysql/mysql.sock by default. Therefore, if your PHP scripts are failing to connect to your custom installation of MySQL, this is a likely cause. To correct this, you can modify the PHP configuration file to use the old MySQL socket location: 1. Create /etc/php.ini if it is not present. (You can do so by copying /etc/php.ini.default to /etc/php.ini). 2. Edit the /etc/phi.ini config file, find the [MySQL] section, and change this line: mysql.default_socket = /var/mysql/mysql.sock To: mysql.default_socket = /tmp/mysql.sock 3. Restart the web server to pick up the new PHP settings. It should not be necessary to restart MySQL. Edited 1 time(s). Last edit at 03/