-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you don't use brew services, install it | |
# https://github.com/Homebrew/homebrew-services | |
# Stop MySQL | |
brew services stop [email protected] | |
# Start MySQL in safe mode | |
mysqld_safe --skip-grant-tables & | |
# Login to MySQL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wouldn't it be great if you could have STI like functionality | |
# without needing to encode strings of class names in the database? | |
# Well today is your lucky day! Discriminable Model is here to help. | |
# | |
# Simply specify your models desired type column, and provide a block to | |
# do the discrimination. If you want the whole STI-esque shebang of properly | |
# typed finder methods you can supply an array of 'discriminate_types' that will | |
# be used to apply an appropriate type. | |
# | |
# class MyModel < ActiveRecord::Base |