I want to completely remove MySQL from my mac (El Capitan).
I installed homebrew and tried to remove MySQL, but I get the error:
Error: No such keg: /usr/local/Cellar/mysql
Actually, by running
brew remove mysql
It is expecting a package called mysql and a corresponding folder in /usr/local/Cellar. But if you installed a specific version of mysql such as mysql#5.7, then that is what you would have to remove:
brew remove mysql
Error: No such keg: /usr/local/Cellar/mysql
Try the version installed:
brew remove mysql#5.7
Uninstalling /usr/local/Cellar/mysql#5.7/5.7.24... (319 files, 234.5MB)
I solved this problem by manually going to /usr/local directory. There was one mysql folder, I deleted. Also, delete my.cnf file, should be present It started working after that. If that too doesn't work, re-install homebrew, that will rectify symlink problem.
Related
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 trying to install a clean mysql on my macos Sierra. As I already installed brew, I decided to use this stackoverflow answer. Nevertheless, before installation, these pre-install check is done:
I have already checked the bash line with mysql command, and found no such command.
I brew info mysql, and found mysql Not Installed.
However, I still have doubt over that I might not have a clean installation environment. So I use the find / -name mysql -type d to search all the directory for mysql. And I've found there are mysql included in MAMP. As these line writes:
/Applications/MAMP/db/mysql
/Applications/MAMP/db/mysql/mysql
/Applications/MAMP/Library/lib/perl5/site_perl/5.22.0/darwin-2level/auto/DBD/mysql
/Applications/MAMP/Library/lib/perl5/site_perl/5.22.0/darwin-2level/DBD/mysql
I've installed MAMP about two years ago. Now I just want to learn mysql in command line rather than one-click environment like MAMP. And I wonder if I can install the mysql using brew to get a generic mysql environment if I don't uninstall the MAMP? And WHY is that the MAMP will/will not affect the mysql installed from brew?
Not really, they wont' be on conflict.
Mamp use another port, and brew use default mysqm port 3306
Mamp use this foder: /Applications/MAMP/Library/bin/mysql
Brew use his own folder : /usr/local/Cellar/mysql/(version...)
with brew you don't need use path to execute bin files, just type 'mysql -uroot -p' on the terminal.
My mysql setup got corrupted which I installed using dmg file, I tried link this link
to clear all traces of mysql and re-installed using dmg again, but I was facing same issue, so I decided to do it with homebrew using installation via homebrew link
But that also didn't work and giving me below error while running the command brew install mysql
Error: Permission denied - /tmp/github_api_headers20161012-13067-iv1vz
I tried changing owner also but that also didn't work for me:
sudo chown -R $(whoami) /tmp/
Someone has faced any such issue??
I am using OSX Yosemite 10.10.3
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.
I installed homebrew and Xcode 4.3.2 with command line tools on Mac Osx Lion and when I now try to install mysql with :
brew install mysql -v
I get the error :
Error: #<BuildError: Failed executing: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.5.20/share/doc/mysql -DINSTALL_INFODIR=/usr/local/Cellar/mysql/5.5.20/share/info -DINSTALL_MYSQLSHAREDIR=share/mysql -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DSYSCONFDIR=/usr/local/etc -DWITH_UNIT_TESTS=OFF -DWITH_READLINE=yes>
Here you find the full log :
https://gist.github.com/2421381
I checked the logs but there is nothing that can help me for the moment. Brew doctor is also clean and give no errors.
Found the solution with thanks to a reply of visoft on my gist post. This solution worked for me. The problem is coming from Cmake, I need version 2.8.7 instead of 2.8.8, run this code to get it work :
cd /usr/local
brew uninstall cmake
git checkout 948c2769 Library/Formula/cmake.rb
brew install mysql
After this, mysql was installed successfully.