Install MySQL 5.6.23 in Linux
Install MySQL 5.6.23 in Linux
Create user
Log on as a root user and create a mysql user to maintain the mysql service.
[Root @ localhost ~] #
[Root @ localhost ~] # Groupadd mysql
[Root @ localhost ~] # Useradd-g mysql
[Root @ localhost ~] # Passwd mysql
Change your mysql password.
New password:
Invalid password: too short
Invalid password: Too simple
Re-enter the new password:
Passwd: All authentication tokens have been successfully updated.
Root @ localhost ~] #
[Root @ localhost mysql] # ll
Total usage 38160
-Rw-r --. 1 root 5959549 March 6 14:47 cmake-3.1.3.tar.gz
-Rw-r --. 1 root 33115859 March 6 14:48 mysql-5.6.23.tar.gz
[Root @ localhost mysql] #
[Root @ localhost mysql] # which cmake
/Usr/bin/which: no cmake in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin: /usr/sbin:/usr/bin:/usr/java/jdk1.7.0 _ 75/bin:/usr/java/jdk1.7.0 _ 75/jre/bin:/root/bin)
[Root @ localhost mysql] #
[Root @ localhost mysql] # tar zxvf cmake-3.1.3.tar.gz
[Root @ localhost mysql] # cmake-3.1.3 cd
[Root @ localhost mysql] #./configure
[Root @ localhost mysql] # make
[Root @ localhost mysql] # make install
Install mysql software
Install the media (mysql-5.6.23.tar.gz)
[Root @ localhost mysql] # tar zxvf mysql-5.6.23.tar.gz
[Root @ localhost mysql] # mysql-5.6.23 cd
[Root @ localhost mysql-5.6.23] # cmake-DCMAKE_INSTALL_PREFIX =/opt/mysql56-DSYSCONFDIR =/opt/mysql56/data-DMYSQL_DATADIR =/opt/mysql56/data-Disposition =/opt/mysql56 /data/mysqld. sock-keys = 1-keys = 1-keys = 1-keys = 1-keys = 1-keys = 1-keys = 1-DENABLED_LOCAL_INFILE = 1-DMYSQL_TCP_PORT = 3306-DWITH_EXTRA_CHARSETS = all-DWITH_DEBUG = 0-DENABLE_DEBUG_SYNC = 0-DWITH_SSL = system-DWITH_ZLIB = system-DWITH_READLINE = 1-DZLIB_INCLUDE_DIR =/usr-DWITH_READLINE = 1
[Root @ localhost mysql-5.6.23] # make
[Root @ localhost mysql-5.6.23] # make install
Run mysql_install_db to generate an authorization table
[Root @ localhost mysql-5.6.23] # cd/opt/
[Root @ localhost opt] # chown-R mysql: mysql mysql56
[Root @ localhost opt] # su-mysql
[Mysql @ localhost ~] $ Cd/opt/mysql56
[Mysql @ localhost mysql56] $ cp scripts/mysql_install_db.
[Mysql @ localhost mysql56] $./mysql_install_db
Configure Automatic Service
Configure mysql Service
Switch to the root user
[Root @ localhost mysql56] # cp-r support-files/mysql. server/etc/init. d/mysql
[Root @ localhost mysql56] # cd/etc/rc. d/init. d
[Root @ localhost init. d] # chmod + x mysql
[Root @ localhost init. d] #/sbin/chkconfig -- del mysql
[Root @ localhost init. d] #/sbin/chkconfig -- add mysql
[Root @ localhost init. d] # service mysql start
The following is the MySQL-related content carefully selected by the editor to see if it is helpful:
Install MySQL 5.6 with the source code in CentOS 7
How to install and configure MySQL5.7.3.0
Install MySQL in Ubuntu 14.04
MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF
Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL
Build a MySQL Master/Slave server in Ubuntu 14.04
Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS
Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04
MySQL-5.5.38 universal binary Installation
This article permanently updates the link address: