Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

There are some differences in between Mac and Linux(CentOS) for my.cnf and some command line interfaces.

...

 There are two different approach to install MySQL on MAC

...

: 1) Install by dmg file can download at https://www.mysql.com/downloads/ and 2) installing by brew. I will talk about the installation based on brew here.

Install MySQL by brew

Code Block
sudo brew install mysql

...

Code Block
#
# created by Chun Kang 2020-03-09
# based on the guide at https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html
#

[client]
port=3306
socket=/tmp/mysql.sock

[mysqld]
port=3306
bind-address=0.0.0.0
skip-name-resolve

character-set-server=utf8mb4
collation-server=utf8mb4_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2GB
transaction-isolation=READ-COMMITTED
binlog_format=row
default_time_zone='+09:00'
max_connections=4096

Start MySQL

Code Block
sudo /usr/local/mysql/support-files/mysql.server start

Stop MySQL

Code Block
sudo /usr/local/mysql/support-files/mysql.server stop

Restart MySQL

Code Block
sudo /usr/local/mysql/support-files/mysql.server restart


Set root access permission from all hosts

Code Block
cd /usr/local/mysql/bin
mysql -u root -p mysql

...