yum remove mysql-server mysql-libs mysql-devel mysql*
rm -rf /var/lib/mysql/
yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
yum-config-manager --disable mysql80-community
yum-config-manager --enable mysql57-community
yum -y install mysql mysql-devel mysql-server
yum -y install mysql mysql-utilities
yum -y install postfix
systemctl enable mysqld.service
systemctl start mysqld.service
systemctl status mysqld.service
cat /var/log/mysqld.log | grep 'password is generated'
mysql_secure_installation
vim /etc/my.cnf
mysql -uroot -p
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
validate-password=OFF
log-slow-admin-statements = 1
log-queries-not-using-indexes = 1
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 0.5
expire_logs_days = 14
easyramble.com
rootにパスワードなしで入る
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set authentication_string=password('') where user='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
stackoverflow.com