Reputation: 135
I have just installed mariadb 10.1.21 latest with brew. here is what i got with command
> mysql.server start
or
/usr/local/Cellar/mariadb/10.1.21/support-files/mysql.server start
whatever.
Starting MySQL
.170225 03:41:19 mysqld_safe Logging to '/usr/local/var/mysql/mac-615.err'.
170225 03:41:19 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
ERROR!
I do not know any reason why I cannot even start mysql daemon.
Upvotes: 1
Views: 2522
Reputation: 181
I had the same problem today. What I did was just uninstalling both mariaDB and mysql.
Remember doing a backup of your DB's in case you need it.
Just run the following commands in you terminal:
For mysql:
brew remove mysql
For mariaDB:
brew remove mariadb
Then, remove mysql folders and files:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/var/mysql
sudo rm -rf /usr/local/mysql*
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
vi /etc/hostconfig and remove the line MYSQLCOM=-YES-
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /private/var/db/receipts/*mysql*
Maybe, most of the folders and files won't exist, just to be sure they won't mess with the installation, do it.
After you have removed mysql and mariaDB files, run
brew cleanup
to ensure cache is gone.
Once it's done, you should be able to do a clean installation of mariadb with
brew install mariadb
Try your installation by running
mysql.server start
If hangs at starting, try restarting mysql with
mysql.server restart -f
By doing this, I was able to run mariadb, I hope it works for you.
Upvotes: 5