1.修改字段
alter table dev_instant_video modify column content varchar(2500)
alter table dev_instant_video_info modify column comment varchar(2500)
2.开启ssl
tar zvxf mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz
mv mysql-5.7.21-linux-glibc2.12-x86_64 /usr/local/mysql
mkdir -p /usr/local/mysql
mkdir -p /usr/local/mysql/data
chown -R mysql.mysql /usr/local/mysql/data
chown -R mysql.mysql /usr/local/mysql
cd /usr/local/mysql/bin/
./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
rpm -qa|grep libaio
yum install libaio-devel.x86_64
./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
vim /etc/my.cnf
cp /usr/local/mysql/support_files/mysql.server /etc/init.d/mysql
ls /usr/local/mysql/support-files/mysql.server
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql
chkconfig --add mysql
/usr/local/mysql/bin/mysql uroot -p
yum install -y openssl
mkdir -p /data/mysql/mysql3306/data
chown -R mysql.mysql /data/mysql/mysql3306/data
chown -R mysql:mysql /data/mysql/mysql3306/data
/usr/local/mysql/bin/mysql_ssl_rsa_setup --datadir=/data/mysql/mysql3306/data
chown -R mysql:mysql /data/mysql/mysql3306/data
cd /etc/
cp my.cnf my.cnf_not
vim my.cnf
[mysqld]
[mysqld]
character_set_server=utf8
init_connect='SET NAMES utf8'
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data/
socket=/tmp/mysql.sock
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
ssl-ca = /data/mysql/mysql3306/data/ca.pemssl-cert = /data/mysql/mysql3306/data/server-cert.pem
ssl-key = /data/mysql/mysql3306/data/server-key.pem
#symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid#
# include all files from the config directory
#
!includedir /etc/my.cnf.d/etc/init.d/mysql stop
/etc/init.d/mysql start
用一个例子来演示会更加清晰