I'm trying to install mysql using brew services start mysql as per the website instructions but it gives me an error:
Formula `mysql` is not installed.
I already did a full uninstall on my XAMPP server.
Terminal:
Dylans-Macbook:~ dylandude$ brew install mysql#5.7
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
ansible jpeg-turbo phplint
ccrypt mapcrafter skinny
dxpy mikutter
jenkins-job-builder pgcli
Warning: mysql#5.7 5.7.23 is already installed and up-to-date
To reinstall 5.7.23, run `brew reinstall mysql#5.7`
Dylans-Macbook:~ dylandude$ brew services start mysql
Error: Formula `mysql` is not installed.
You have installed the version 5.7 of MySQL with:
brew install mysql#5.7
So you have to start the service with:
brew services start mysql#5.7
Related
So I installed mysql through brew, and I installed 2 versions on my Mac OS -
mysql 5.7
mysql 8.0
I brew link 'ed to 5.7, so if I type mysql --version, it gives me distro 5.7.26.
The problem is here. Right now if I type brew services list, there are
two services mysql stopped and mysql#5.7 stopped
If I brew services start mysql, then I sudo mysql in the Terminal, I can connect to mysql server. But it shows the server instance is 8.0. Well, I guess unlike command line, brew services start XXX would not pick up the linked XXX
If I brew services start mysql#5.7, and I sudo mysql, it would not connect successfully. It gives me the error ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) I think it means the mysql client does not find an active open instance.
How to connect to an older version of local mysql instance?
Well, resolved myself after 2 days effort.
The solution is that, if I want to run a local mysql 5.7 instance, I need to completely remove any system mysql 8.0 . and mysql 5.7 folder, as well as remove formulas from brew
Finally reinstall only mysql 5.7
brew uninstall mysql
brew uninstall mysql#5.7
rm -rf /usr/local/var/mysql
rm /usr/local/etc/my.cnf
brew install mysql#5.7
brew link --force mysql#5.7
brew services start mysql#5.7
as found in https://medium.com/#at0dd/install-mysql-5-7-on-mac-os-mojave-cd07ec936034
I need to install MySQL 5.6 on my Mac, running under Mojave. (Because AWS Aurora Serverless only allows MySQL 5.6)
That wouldn't be an issue if a .dmg was available, but there are none for MacOS for this particular version, too old I guess?
See https://dev.mysql.com/downloads/mysql/5.6.html
No Mac OS in the list. I tried to play around with the URL to see if there was a non-reference dmg file, but no luck.
Which leads me to two choices:
Install it from source (is it possible? how?)
Install it in a Docker container
I don't know what's the most simple/straightforward way to install it. It's only meant to be used locally.
To install:
brew install mysql#5.6
To have launchd start mysql#5.6 now and restart at login:
brew services start mysql#5.6
Or, if you don't want/need a background service you can just run:
/usr/local/opt/mysql#5.6/bin/mysql.server start
I'd recommend using homebrew to be honest. I think it's brew install mysql#5.6 if you have homebrew installed already.
You may need to also add the install bin directory to your system path, but the command output will tell you what to do if so.
To install MySQL version 5.6
brew install mysql#5.6
MySql will be installed in below path :
/usr/local/opt/
Add MYSQL_HOME to your environment variable
MYSQL_HOME=/usr/local/opt/mysql#5.6
goto folder
/usr/local/opt/mysql#5.6/bin
mysql.server start
I'm attempting to install a previous version of MySql (5.5.31) on my Mac OSX device running 10.9 Mavericks. I have been told this is possible, however, I cannot seem to locate a download for 5.5.31 Mac OSX.
I have a later version (5.6.19) installed, and I tried:
brew switch mysql 5.5.31
but I keep getting the error message:
"Error: mysql not found in the Cellar."
And I know this is because there's no 5.5.31 MySql file for it to switch to.
Anyone do this on their Mac?
Thanks
This is an old question, but I stumbled upon it through Google, so here's to anyone to stumbles upon it later.
I was trying to install MySQL 5.5 on OS X 10.10 through Homebrew.
First, you have to add homebrew/versions to your taps with:
$ homebrew tap homebrew/versions
Second, install MySQL 5.5 with:
$ homebrew install mysql55
if that doesn't work, try:
$ homebrew install homebrew/versions/mysql55
After that has successfully installed, you will get the message:
...A "/etc/my.cnf" from another install may interfere with a
Homebrew-built server starting up correctly.
To connect:
mysql -uroot
To load mysql55:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql55.plist Or, if you don't want/need launchctl, you can just run:
mysql.server start ❯ cd /usr/local/Cellar/mys
Try mysql.server start, if that doesn't work you need to update your $PATH. In my case I added /usr/local/Cellar/mysql55/5.5.40/bin to my $PATH in my .zshrc. You can find the location of your installation by using:
$ homebrew info mysql55
After that it should work after you've added that directory to your .zshrc/.bashrc/.bash_profile etc.
Does installing MySQL with homebrew include MySQL workbench and GUI as if you were to run the Native installer (to be able to start and stop services)? I am trying to decide whether it is better to install using homebrew or with native.
homebrew mysql does not contain mysqlworkbench. Mysqlworkbench is another recipe that it is not exactly in homebrew but in homebrew cask (manager for GUI installs).
For GUI installs and 'other licence' installs there is a homebrew related package manager called homebrew cask.
You can find the caskroom recipes from homebrew,
$ brew search mysql
automysqlbackup
mysql ✔
mysql++
mysql-cluster
mysql-connector-c
mysql-connector-c++
mysql-sandbox
mysql-search-replace
mysqltuner
homebrew/php/php53-mysqlnd_ms
homebrew/php/php55-mysqlnd_ms
homebrew/versions/mysql51
homebrew/versions/mysql56
Caskroom/cask/mysqlworkbench
homebrew/php/php54-mysqlnd_ms
homebrew/php/php56-mysqlnd_ms
homebrew/versions/mysql55
Caskroom/cask/mysql-utilities
Caskroom/cask/navicat-for-mysql
but for install them you need to install cask.
brew tap caskroom/cask
brew cask search mysql
brew cask install mysqlworkbench
The workbench is installed in /opt so unless the installer makes an alias to Applications you are not going to find it easily.
NOTE: As of March 2018, the brew installer does make an alias to the Applications folder, so no further action is required.
If you are unable to see it in the Applications folder, you should follow the following:
In my installation the mysqlworkbench was not aliased to /Applications, but in the workbench folder there is a symlink to the Application folder so it is easy to create the link yourself.
$ ll /opt/homebrew-cask/Caskroom/mysqlworkbench/6.3.6
total 224
lrwxr-xr-x 1 pmg staff 14 31 Jan 11:55 Applications -> /Applications/
drwxr-xr-x 3 pmg staff 102 10 Dec 14:55 MySQLWorkbench.app
-rw-r--r--# 1 pmg staff 107640 10 Dec 14:55 background.tiff
make the alias
cd /opt/homebrew-cask/Caskroom/mysqlworkbench/6.3.6/
ln -s MySQLWorkbench.app Applications
You can run the application now from Apps
The Homebrew install does not include Workbench. The download and install of Workbench on OSX is pretty painless (a download and copy - no installer).
Here is some nice info on using Homebrew to install mysql http://blog.joefallon.net/2013/10/install-mysql-on-mac-osx-using-homebrew/
First of all you need to know which versions are available for MySQL:
brew search mysql
You get to know know the versions as it will display after execution of the above command. For example I get this in console: mysql#5.6. There may be multiple versions, so choose accordingly.
Then execute the below command:
brew install mysql#5.6
After installing MySQL, start the services of mysql using the below command:
brew services start mysql#5.6
After the service has started, install mysqlworkbench using the below command:
brew cask install mysqlworkbench
To update the current MySQL installation:
brew upgrade mysqlworkbench
I used homebrew to install mysql and it installed 5.6.15. I need to have some version of 5.5 installed. Currently in usr/local/Cellar I have just 5.6.15, how can I add an older version to that so I can use the 'brew switch' command to use the version I want to?
This page details how to install older versions of a formula, using Subversion as an example. In a nutshell, to get MySQL 5.5:
$ brew tap homebrew/versions
$ brew -S mysql
automysqlbackup mysql-cluster mysql-proxy
groonga-normalizer-mysql mysql-connector-c mysqlreport
mysql mysql-connector-c++
mysql++ mysql-connector-odbc
josegonzalez/php/php53-mysqlnd_ms homebrew/versions/mysql51
josegonzalez/php/php54-mysqlnd_ms homebrew/versions/mysql55
josegonzalez/php/php55-mysqlnd_ms
$ brew install mysql55