Mysql5.7.18
Rpm-qa|grep mariadb//query out installed MARIADB
RPM-E--nodeps file name//uninstall MARIADB, file name for the above command query out of files
Yum-y install gcc gcc-c++ ncurses ncurses-devel cmake Bison
5.7/5.7 Decompression Renaming
Chmod-r 755 mysql/
Chown-r LBD.LBD mysql/
LBD User Default has created someone who likes to use MySQL user
Rm/etc/my.cnf
Mkdir–p/usr/local/mysql/data
mkdir–p/var/lib/mysql/
Bin/mysqld–initialize--USER=LBD Basedir=/usr/local/mysql--datadir=/usr/local/mysql/data
Haoglu1gw6;c their different passwords.
Bin/mysql_ssl_rsa_setup--datadir=/usr/local/mysql/data
Vim/etc/my.cnf
[MySQL]
Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
Skip-name-resolve
#设置3306端口
Port = 3306
Set up the installation directory for MySQL
Basedir=/usr/local/mysql
Set up the data storage directory for the MySQL database
Datadir=/usr/local/mysql/data
Maximum number of connections allowed
max_connections=200
The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
Default storage engine that will be used when creating a new table
Default-storage-engine=innodb
max_allowed_packet=16m
CP Support-files/mysql.server/etc/init.d/mysqld
Vim/etc/init.d/mysqld
Basedir=/usr/local/mysql
Datadir=/usr/local/mysql/bin
Shielding
#lockdir = '/var/lock/subsys '
#lock_file_path = "$lockdir/mysql"
Cd/usr/local
Chown-r LBD.LBD mysql/
Service mysqld Start
Ln-s/usr/local/mysql/bin/mysql/usr/bin/mysql
Chkconfig--add mysqld #增加mysqld服务
Chkconfig--list #列出所有的系统服务
Chkconfig--level mysqld on
#设定mysqld在等级3和5为开机运行服务
Mysql–u root–p
The previous password
SET PASSWORD = PASSWORD (' lbd123 '); Reset password
Grant all privileges the to ' root ' @ '% ' identified by ' lbd123 ';
FLUSH privileges;
5.7.18 of differences between mysql5.7 and mysql5.6 in CentOS7.4 installation