In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly gives you a brief introduction to the detailed method of installing MySQL5.7.18 on the CentOS6.5 system. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article on the detailed method of installing MySQL5.7.18 in the CentOS6.5 system can bring you some practical help.
Download CentOS6.5_X86 installation based on Basic Server
Http://archive.kernel.org/centos-vault/6.5/isos/i386/CentOS-6.5-i386-bin-DVD1.iso
MySQL officially downloads https://dev.mysql.com/downloads/mysql/
MySQL online documentation / download https://dev.mysql.com/doc/refman/5.7/en/
MySQL compilation options document https://dev.mysql.com/doc/refman/5.7/en/source-configuration-options.html
Installation dependencies:
[root@CentOS ~] # yum install cmake [root@CentOS ~] # yum install gcc [root@CentOS ~] # yum install gcc-c++ [root@CentOS ~] # yum install readline [root@CentOS ~] # yum install ncurses-devel [root@CentOS ~] # yum install bison [root@CentOS ~] # rm-rf / etc/my.cnf / etc/mysql/my.cnf
Download, compile, and install MySQL management software
[root@CentOS ~] # useradd mysql [root@CentOS ~] # su-mysql [mysql@CentOS ~] $wget http://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.7/mysql-boost-5.7.18.tar.gz[mysql@CentOS ~] $tar xf mysql-boost-5.7.18.tar.gz [mysql@CentOS ~] $cd mysql-5.7.18/ [mysql@CentOS mysql-5.7.18] $\ rm-rf CMakeCache.txt \ make clean;\ cmake. \-DWITH_BOOST=boost/boost_1_59_0/\-DCMAKE_INSTALL_PREFIX=$ {HOME} / MySQL/\-DCMAKE_BUILD_TYPE=Release\-DDEFAULT_CHARSET=utf8\-DDEFAULT_COLLATION=utf8_general_ci\-DWITH_MYISAM_STORAGE_ENGINE=1\-DWITH_INNOBASE_STORAGE_ENGINE=1\-DWITH_ARCHIVE_STPRAGE_ENGINE=1 \-DWITH_BLACKHOLE_STORAGE_ENGINE=1\-DWIYH_READLINE=1\ & & make & & make install [mysql@CentOS mysql-5.7.18] $echo $? 0
Write a configuration file for the database management software
[mysql@CentOS ~] $cd ${HOME} / MySQL [mysql@CentOS MySQL] $mkdir-p ~ / MySQL/etc [mysql@CentOS MySQL] $vim etc/my.cnf [chunli@CentOS MySQL_5.7.18] $cat etc/my.cnf [client] port=3306socket=/tmp/mysql.sock_001 [mysqld] # mysqld basic Settings port= 3311log-error = / home/mysql/MySQL/mysql-error.logpid-file = / home/mysql/MySQL/mysql.pidbasedir = / home/mysql/MySQLdatadir = / home/mysql/MySQL/dataport=3306 # the default is 3306log-error = mysql-error.logsocket = / tmp/mysql.sock_001 pid-file = mysql.pid default-time-zone ='+ 8 mysql-error.logsocket 00log # mysqld binary log related log-bin=mysql-bin # turn on binary log function server_id=1000001 # Open binary must specify serverIDbinlog_format = mixedbinlog_cache_size = 4Mmax_binlog_cache_size = 8Mmax_binlog _ size = 1G# mysqld performance dependent max_connections = 3000 # specify the maximum number of connection processes allowed by the mysql service max_allowed_packet = 4m # set the maximum number of messages that can be transmitted at a time in network transmission The system defaults to 1Msort_buffer_size = 16m # sort buffer to handle sorting caused by orderby and groupby queues. The default size is 2Mjoin_buffer_size = 8m # buffer size used for joint query operations thread _ cache_size = 64 # sets the maximum number of connection threads that can be cached in the threadcache pool. The default is 0. This value indicates that the number of threads saved in the cache query_cache_size = 64m # can be reused to specify the size of the mysql query buffer to buffer the results of select and return the results directly instead of executing the query the next time the same query is executed query_cache_limit = 4m # only results less than this value are buffered Place a maximum result to overwrite all other query results over the size of the tmp_table_size = 256m # memory temporary table. If this value is exceeded, the temporary table will be written to disk default_storage_engine = InnoDB # the default storage engine used when creating the table key_buffer_size = 384m # specifies the size of the index buffer Memory for 4G time is set to 256m or 384m configuration file all parameters are here: [mysql@CentOS ~] $/ home/mysql/MySQL/bin/mysqld-- verbose-- help
Create a data warehouse on disk and generate the warehouse file:
[mysql@CentOS mysql-5.7.18] $cd ${HOME} / MySQL [mysql@CentOS MySQL] $mkdir-p data; [mysql@CentOS MySQL] $rm-rf data/*;. / bin/mysqld-- initialize get the temporary password: Aa8gjN3k2K/a
Start, shut down, log in
[mysql@CentOS MySQL] $bin/mysqld_safe & # start the MySQL service, run the warehouse files with the process [root@CentOS MySQL] #. / bin/mysqladmin-uroot-p shutdown # close the MySQL service [mysql@CentOS ~] $. / MySQL/bin/mysql-hlocalhost-uroot-p # log in to MySQLEnter password: enter the temporary password you just got and immediately change the password, cancel the MySQL root remote login restrictions ALTER USER USER () IDENTIFIED BY 'root';use mysql; select host, user from user Update user set host ='% 'where user =' root';select host, user from user;FLUSH PRIVILEGES
If the temporary password is not displayed when initializing the database file:
If you do not get the initialization password of MySQL vim etc/ my.cnf [mysqld] skip-grant-tables # add restart mysqlmysql-uroot-p enter ALTER USER USER () IDENTIFIED BY 'temp_password';vim etc/ my.cnf [mysqld] skip-grant-tables # delete restart mysqlmysql-uroot-p enter ALTER USER USER () IDENTIFIED BY' real_password'; you can now log in normally and cancel MySQL root remote login restrictions use mysql; select host, user from user Update user set host ='% 'where user =' root';select host, user from user;FLUSH PRIVILEGES
MySQL related file path
MySQL Program path / home/laowang/MySQL_5.7.18
Database file storage path / home/laowang/MySQL_5.7.18/data
Error log path of MySQL / home/laowang/MySQL_5.7.18/data/CentOS.err
MySQL service process PID / home/laowang/MySQL_5.7.18/data/CentOS.pid-file
At this point, a new instance of MySQL is complete
Repeat the steps of downloading, compiling, and installing MySQL management software, and modify the configuration file slightly to install multiple MySQL instances.
CentOS6.5 system installation of MySQL5.7.18 detailed method to tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.