Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
yum -y localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y install mysql-community-server
mysql --version
systemctl start mysqld.service
systemctl stop mysqld.service
systemctl enable mysqld.service // 自動起動
systemctl status mysqld.service
systemctl restart mysqld.service
docker run -d -it --privileged -p 80:80 -v /Users/tkc/git/Docker-MT/Code/web0:/var/www --name web0 centos:7 /sbin/init
# /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# /etc/my.cnf
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
# Add utf8 setting
character_set_server=utf8
skip-character-set-client-handshake
## password sample 3rhnIAxj(mx6
mysql_secure_installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.