MySQL-5.6.30 installation notes [source installation]

Binary installation package:
mysql-5.6.30.tar.gz Operating system

:
CentOS 6.6

Required dependencies:
gcc
gcc-c++
cmake
libaio
ncurses-devel
The


installation
: [root@localhost ~]# useradd mysql
[root@localhost ~]# su - mysql
[mysql@localhost ~]$ mkdir mysql_base
[mysql@localhost ~]$ mkdir mysql_data
[mysql@localhost ~ ]$ tar zxvf mysql-5.6.30.tar.gz

[mysql@localhost ~]$ cd mysql-5.6.30

[mysql@localhost ~]$ cmake . -DCMAKE_INSTALL_PREFIX=/home/mysql/mysql_base -DMYSQL_DATADIR=/home/mysql/mysql_data -DMYSQL_TCP_PORT=3306 -DSYSCONFDIR=/home/mysql_base/etc -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION =utf8_general_ci -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1

[mysql@localhost ~]$ make
[mysql@localhost ~]$ make install

[mysql@localhost ~]$ cd /home/ mysql/mysql_base/scripts


Initialize the database:
[mysql@localhost scripts]$ ./mysql_install_db --user=mysql --basedir=/home/mysql/mysql_base --datadir=/home/mysql/mysql_data
After initialization, under the mysql_base path The my.cnf configuration file
my.cnf configuration will appear


[mysqld]
innodb_buffer_pool_size = 128M
basedir=/home/mysql/mysql_base
datadir=/home/mysql/mysql_data
port=3306
default-storage-engine=InnoDB
character-set-server=utf8
open_files_limit=4096

socket=/tmp/mysql.sock

[mysql]
default-character-set=utf8

[mysqld_safe]
log-error=/home/mysql/mysql_base/var/log/mysqld.log



Configure environment variables and add /home/mysql/mysql_base/bin to the PATH environment variable to ensure that each login user can find mysql related commands!
Security settings, including setting the root password
[mysql@localhost ~]$ mysql_secure_installation to start the database: [mysql@localhost ~]$ cp /home/mysql/mysql_base/support-files/mysql.server /etc/init.d/mysqld [mysql @localhost ~]$ /etc/init.d/mysqld start






Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326874012&siteId=291194637