Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
416 votes
17 answers
590k views

brew install mysql on macOS

I'm trying to setup up MySQL on mac os 10.6 using Homebrew by brew install mysql 5.1.52. Everything goes well and I am also successful with the mysql_install_db. However when I try to connect to the ...
nikola's user avatar
  • 5,346
338 votes
40 answers
625k views

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' [duplicate]

I installed MySQL on Mac OS X Mountain Lion with homebrew install mysql, but when I tried mysql -u root I got the following error: ERROR 2002 (HY000): Can't connect to local MySQL server through ...
shrewdbeans's user avatar
  • 12.3k
264 votes
27 answers
587k views

Setting the MySQL root user password on OS X

I just installed MySQL on Mac OS X. The next step was setting the root user password, so I did this next: Launch the terminal app to access the Unix command line. Under the Unix prompt I executed ...
madaura's user avatar
  • 2,641
258 votes
24 answers
353k views

How do you stop MySQL on a Mac OS install?

I installed MySQL via MacPorts. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)?
Laurie Young's user avatar
240 votes
16 answers
629k views

How to start MySQL server from command line on Mac OS Lion?

I installed mySQL on my Mac. Beside starting the SQL server with mySQL.prefPane tool installed in System Preferences, I want to know the instructions to start from command-line. I do as follows: After ...
vietstone's user avatar
  • 8,964
237 votes
34 answers
459k views

Location of my.cnf file on macOS

I'm trying to follow along this tutorial to enable remote access to MySQL. The problem is, where should my.cnf file be located? I'm using Mac OS X Lion.
nicolas's user avatar
  • 2,630
230 votes
16 answers
275k views

How do you uninstall MySQL from Mac OS X?

I accidentally installed the PowerPC version of MySQL on my Intel Mac in Snow Leopard, and it installed without a problem but of course doesn't run properly. I just didn't pay enough attention. Now ...
Joseph Ravenwolfe's user avatar
228 votes
23 answers
480k views

Reset MySQL root password using ALTER USER statement after install on Mac

I recently installed MySQL and it seems I have to reset the password after install. It won't let me do anything else. Now I already reset the password the usual way: update user set password = ...
dengar81's user avatar
  • 2,505
222 votes
2 answers
44k views

Warning the user/local/mysql/data directory is not owned by the mysql user

I can't start the mysql service in Snow Leopard, and in the panel prefs appears the message, warning the user/local/mysql/data directory is not owned by the mysql user How can I fix this?
Kronos's user avatar
  • 7,541
221 votes
23 answers
551k views

How to stop mysqld

To find out the start command for mysqld (using a mac) I can do: ps aux|grep mysql I get the following output, which allows me to start mysql server. /usr/local/mysql/bin/mysqld --basedir=/usr/...
David542's user avatar
  • 109k
206 votes
18 answers
302k views

How do I install command line MySQL client on mac?

I want to install the MySQL client for the command line, not a GUI. I have searched over the web but only found instructions on installing the MySQL server.
hch's user avatar
  • 6,280
186 votes
9 answers
263k views

MySQL user DB does not have password columns - Installing MySQL on OSX

I am trying to change MySql root password. What I have done is below. Install MySql-5.7.6 ~ .dmg(Community Server) and workbench. Turn off the server on OSX System preferences. Access MySql with ...
Juneyoung Oh's user avatar
  • 7,550
173 votes
29 answers
425k views

Error: Tablespace for table xxx exists. Please DISCARD the tablespace before IMPORT

I am running a local server of MySQL 5.6.10 on MacOS 10.8.3 and manage my database via Navicat essentials for MySQL. The error I get is that after running and managing my database just fine for a ...
MattMirabilis's user avatar
165 votes
27 answers
184k views

MacOSX homebrew mysql root password

For some reason MySQL stopped giving access for root. Uninstalled and reinstalled with Homebrew. Fresh install, fresh tables but when I enter mysql -u root -p I get this error: Access denied for ...
Alisher Ulugbekov's user avatar
153 votes
10 answers
184k views

Mac OS X - EnvironmentError: mysql_config not found

First off, yeah, I've already seen this: pip install mysql-python fails with EnvironmentError: mysql_config not found The problem I am trying to use Django on a Google App Engine project. However, ...
daniel_c05's user avatar
  • 11.5k
128 votes
28 answers
114k views

rails + MySQL on OSX: Library not loaded: libmysqlclient.18.dylib

I'm just starting out with Ruby (and rails). I did the setup according to http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:ruby gems, using rvm. I have everything working well with sqlite....
George Armhold's user avatar
128 votes
3 answers
158k views

How to close this ssh tunnel? [closed]

I opened a ssh tunnel as described in this post: Zend_Db: How to connect to a MySQL database over SSH tunnel? But now I don't know what I actually did. Does this command affect anything on the server?...
Jacob's user avatar
  • 1,793
127 votes
36 answers
313k views

MySQL Database won't start in XAMPP Manager-osx

I downloaded XAMPP about a month ago and it was working just fine. Today I installed a voice recognition software and then restarted my computer. Ever since, MySQL won't start in my manager-osx ...
nitrous's user avatar
  • 1,727
102 votes
12 answers
156k views

Easiest way to activate PHP and MySQL on Mac OS 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion)?

What is the easiest way to activate PHP and MySQL on Mac OS 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion)? I'd prefer to use any bundled versions before resorting to downloading from the PHP ...
Matt Sephton's user avatar
  • 3,950
100 votes
14 answers
201k views

How to install MySQLdb (Python data access library to MySQL) on Mac OS X?

How do I get MySQLdb working on Mac OS X?
mblackwell8's user avatar
  • 3,065
95 votes
8 answers
309k views

Find out where MySQL is installed on Mac OS X

How do I find out where MySQL is installed on Mac OS X 10.7.9? I have MAMP installed so I presume that it is bundled with this install?
weaveoftheride's user avatar
94 votes
21 answers
155k views

Mysql password expired. Can't connect

I just wiped my Mac and did a fresh install of El Capitan. I'm struggling to connect to Mysql now. Having gone through a web server setup process, I've created a simple PHP test file: <?php $...
CaribouCode's user avatar
  • 14.3k
94 votes
8 answers
155k views

Connect to Docker MySQL container from localhost?

I have a docker mysql image running, following is what the docker-compose.yml file looks like: db: image: mysql environment: MYSQL_ROOT_PASSWORD: "" MYSQL_ALLOW_EMPTY_PASSWORD: yes ...
Caleb's user avatar
  • 3,762
93 votes
10 answers
176k views

MySQL data directory location

I installed MySQL on a Mac after downloading its DMG file version 64 bit. While trying to create a database it gave me error 1006 -- can't create database. After browsing a number of website, it seems ...
iwan's user avatar
  • 7,509
91 votes
14 answers
419k views

Mac install and open mysql using terminal

I downloaded the mysql dmg file and went through the wizard to run. Done. I have also started mysql server under system preferences. The purpose of me doing this is to work through the exercises of my ...
Doug Fir's user avatar
  • 20.8k
90 votes
13 answers
152k views

Cannot find mysql.sock

I just had to re-install mysql and I am having a problem starting it up. It cannot find the socket (mysql.sock). The problem is that neither can I. In my Mac OS X 10.4 terminal, I type: locate ...
Tony's user avatar
  • 19k
88 votes
6 answers
105k views

Is it possible to install only mysqldump on macOS

Is it possible to install only mysqldump on macOS without MySQL itself. I'm using MySQL db via Docker, but can't dump the DB from my local machine via MySQL Workbench. /Applications/MySQLWorkbench....
D.R.'s user avatar
  • 2,768
87 votes
14 answers
106k views

Ruby on Rails 3 Can't connect to local MySQL server through socket '/tmp/mysql.sock' on OSX

I have a standard Rails3 environment, RVM 1.2.9, Rails 3.0.5, Ruby 1.9.2p180, MySQL2 Gem 0.2.7, mysql-5.5.10-osx10.6-x86_64 Error I get when running rake db:migrate to create database is: Can't ...
Jamie Buchanan's user avatar
80 votes
15 answers
113k views

MySQL Install: ERROR: Failed to build gem native extension

I'm trying to get MySQL installed to the latest version due to some installation going wrong somewhere along the line. I run the command gem install mysql and I receive the following: Building ...
Kieran Senior's user avatar
78 votes
5 answers
62k views

How to auto-load MySQL on startup on OS X Yosemite / El Capitan

After upgrading OS X my install of MySQL stopped loading on startup. This walk-through on MySQL says: "The Startup Item installation adds a variable MYSQLCOM=-YES- to the system configuration ...
Justin's user avatar
  • 27k
70 votes
15 answers
104k views

Unable to access MySQL after it automatically generated a temporary password

I have erased and installed OSX 10.11 El Capitan and I have been following through this tutorial to get MySQL up and running on the new OS X. The first step was to download MySQL For Mac OS X 10.9 (...
Cheetah Felidae's user avatar
69 votes
7 answers
26k views

Mysql not starting in a docker container on MacOS after docker update

I just upgraded to Docker Desktop 2.4 on MacOS, from version 2.3. Suddenly none of my mysql containers will start. The logs show this as the reason: Different lower_case_table_names settings for ...
Cully's user avatar
  • 6,836
69 votes
2 answers
24k views

What user should own /usr/local/mysql on Mac?

What should the file owner & group be of /usr/local/mysql and all contained files & directories? MySQL was working fine, but after I did sudo chown -R $USER:staff /usr/local to install ...
ma11hew28's user avatar
  • 125k
68 votes
18 answers
111k views

MySQL does not start when upgrading OSX to Yosemite or El Capitan

I know similar questions exist, such as MySQL with MAMP does not work with OSX Yosemite 10.10. However, I do have MAMP, nor XAMPP installed on my computer. When I try to start mySQL from the PrefPane,...
Adam_G's user avatar
  • 7,707
65 votes
7 answers
57k views

Python: MySQLdb and "Library not loaded: libmysqlclient.16.dylib"

The setup... Trying to set up a clean Mac os X 10.6 install to develop python/django and I didn't remember running into this on 10.5. After installing MySQL from the installer on mysql-5.5.8-osx10.6-...
rennat's user avatar
  • 2,539
59 votes
9 answers
42k views

results grid not showing on mysql workbench 6.3.9 for macOS sierra

At firs it was working alright, but out of the blue it disappeared, and there is no way to bring it back. Note the gray area with the Apply and Revert buttons, where the results grid should be. I ...
Martin Ocando's user avatar
56 votes
8 answers
176k views

How to fix "command not found: mysql" in Zsh

I want to use MySQL with my Rails application. After successfully installing the package and seeing the option to start and stop the server from the Preference Pane, if I execute mysql --version I ...
Aniruddha's user avatar
  • 3,277
55 votes
7 answers
43k views

MacOSX: autostart mysql on boot

I just installed mysql in terminal through homebrew. Now when I try to connect to mysql it fails, but after I run mysqld it works.. So what I need to do now is run mysqld when I boot my Mac. I've ...
Tim Baas's user avatar
  • 6,105
53 votes
12 answers
25k views

Can't install mysql2 gem on macOS Sierra

I'm setting up my development environment in the new macOS Sierra . First of all, I installed Rbenv, Ruby (2.3.1), Homebrew and so the latest version of MySQL (5.7.15). $ brew install mysql $ mysql....
Caio Tarifa's user avatar
  • 6,023
52 votes
6 answers
135k views

Using MySQL in the command line in OS X - command not found?

I'm trying to get MySQL up and running on my Mac OS X 10.9.5. I've installed the latest version 5.6.21 of MySQL Community Server. I've gone to system preferences and started the mysql server, then ...
user1574598's user avatar
  • 3,861
52 votes
8 answers
69k views

$PATH not being saved after I leave terminal

I just installed mysql server 5.5.20 on my OS X Lion and everything works fine.Now,every time I go into terminal I have to explicitly write: PATH=${PATH}:/usr/local/mysql/bin because is not being ...
Daniel's user avatar
  • 3,017
47 votes
6 answers
75k views

Getting MySQL working on OSX 10.7 Lion

I'm currently trying to get MySQL working on OSX 10.7 Lion. I tried the brew way: brew install mysql -> cmake -> no problems -> make -> no problems -> make install -> ...
sdepold's user avatar
  • 6,201
44 votes
5 answers
35k views

Add mysqldump to MAMP (MySQL /w Apache PHP on MacOS X)

I wonder how I can add mysqldump to my MAMP environment. I googled a bit and found only the community MySQL server version. But I do not want to install another MySQL – basically because I want to ...
Matt Bannert's user avatar
  • 28.1k
44 votes
12 answers
37k views

How to connect MySQL workbench with MAMP PRO?

What is the fix to connect the MySQL Workbench tool with the MAMP PRO MySQL database?
Chris Hough's user avatar
  • 3,509
43 votes
3 answers
16k views

Warning: The post-install step did not complete successfully when trying to install mysql using brew in Mac OS High Sierra

Trying to install mysql5.7 with brew on Mac OS High Sierra. I have used the following commands: sudo rm -rf /usr/local/var/mysql/ brew install [email protected] brew postinstall [email protected] Got the below ...
N20084753's user avatar
  • 2,160
42 votes
7 answers
61k views

libmysqlclient15-dev on macs?

Does OSX need an install of libmysqlclient15-dev? I'm trying to compile a gem that is failing and a lot of sources says to install "libmysqlclient15-dev" but I only see this for Linux, not OSX. Am I ...
maccy1's user avatar
  • 523
39 votes
9 answers
66k views

Restoring deleted 'root' user and password for MySQL

I accidentally deleted the root user on my local dev setup of MAMP/MySQL running on OS X. There are no other users created to get back into MySQL. This is a mild nightmare can't seem to do anything ...
PHPeer's user avatar
  • 413
39 votes
7 answers
25k views

mysql2 gem fails to compile with MySQL 5.6.12 on OS X with Homebrew

I updated all the packages I installed with Homebrew. MySQL got upgraded to 5.6.12 (from 5.5.27 or so): $ mysql --version mysql Ver 14.14 Distrib 5.6.12, for osx10.8 (x86_64) using EditLine wrapper ...
Pablo Fernandez's user avatar
37 votes
5 answers
22k views

brew link mysql did not complete

For some some reason brew does not link mysql and it complains about permission. I chmod the folder to 777 but I am still having the same issues laptop$ brew install mysql Error: mysql-5.5.27 ...
tawheed's user avatar
  • 5,755
37 votes
4 answers
38k views

MySQL server start issues on Mavericks

I am having difficulty using MySQL on my MacBook, I am trying to start my server using sudo mysqld_safe and this results in the following output: 140131 00:03:02 mysqld_safe Logging to '/usr/local/...
user3144542's user avatar

1
2 3 4 5
34