In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
To compile and install 1.MySQL, you need to use cmake and Boost C++ libraries, so you need to install cmake and compiler in advance before installation. [root@oel6 ~] # yum-y install gcc gcc-c++ ncurses ncurses-devel cmake
two。 Download MySQL source code, and choose to download Generic Linux (Architecture Independent), Compressed TAR Archive Includes Boost Headers version, which contains boost library information. You do not need to download [root@oel6 local] # wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.15.tar.gz3. separately. Add mysql user [root@oel6 local] # groupadd mysql [root@oel6 local] # useradd-r-g mysql-s / bin/nologin mysql
4.
5. Compile and install MySQL [root @ oel6 local] # mkdir-p / mysql/data [root@oel6 local] # cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\-DMYSQL_DATADIR=/mysql/data\-DWITH_BOOST=/usr/local/mysql-5.7.15/boost/boost_1_59_0\ [root@oel6 mysql-5.7.15] # make [root@oel6 mysql-5.7.15] # make install
Clear compilation error message [root@oel6 mysql-5.7.15] # make clean [root@oel6 mysql-5.7.15] # rm CMakeCache.txt
6. Initialize the MySQL database [root@oel6 ~] # cd / usr/local/mysql/ [root@oel6 mysql] # chown-R mysql:mysql. / [root@oel6 mysql] # bin/mysqld-initialize-user=mysql-basedir=/usr/local/mysql-datadir=/mysql/data2016-10-06T05:11:36.422748Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use-- explicit_defaults_for_timestamp server option (see documentation for more details). 2016-10-06T05:11:36.832157Z 0 [Warning] InnoDB: New log files created, LSN=457902016-10-06T05:11:36.900930Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.2016-10-06T05:11:36.961751Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 5b4533be-8b83-11e6-927a-0800279bbbbf.2016-10-06T05:11:36.963090Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.2016-10-06T05:11:36.964712Z 1 [Note] A temporary password is generated for root@localhost: UIY2:ZVrv) u [root@oel6 mysql] # bin/mysql_ssl_rsa_setup-- datadir=/mysql/dataGenerating a 2048 bit RSA private key.+++.... .. + writing new private key to 'ca-key.pem'-Generating a 2048 bit RSA private key..+++.. . .. + writing new private key to 'server-key.pem'-Generating a 2048 bit RSA private key.+++... .... + writing new private key to 'client-key.pem'-
For MySQL versions prior to 5.7.6, initialize bin/mysql_install_db-- user=mysql using the following command
7. Start the MySQL database (compile the installed MySQL / etc/my.cnf file will be created by default) [root@oel6 ~] # cd / mysql [root@oel6 mysql] # mkdir log [root@oel6 mysql] # mkdir run [root@oel6 ~] # chown-R mysql:mysql / mysql [root@oel6 mysql] # cat / etc/my.cnf [mysqld] / / non-default parameters will affect the server-based database datadir=/mysql/datauser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0 [mysqld _ safe] [root@oel6 mysql] # bin/mysqld_safe-- user=mysql & [1] 27572 [root@oel6 mysql] # 2016-10-06T05:21:00.684235Z mysqld_safe Logging to'/ mysql/log/mysqld.log'.2016-10-06T05:21:00.709272Z mysqld_safe Starting mysqld daemon with databases from / mysql/data
8. Log in to the MySQL database [root@oel6 ~] # vi / root/.bash_profile PATH=$PATH:$HOME/bin:/usr/local/mysql/bin / / add the path to mysql [root@oel6 ~] # in the environment variable. / root/.bash_profile [root@oel6 mysql] # mysql-u root-h localhost-pEnter password:; uIY2:ZVrv) uWelcome to the MySQL monitor.
9. Configure MySQL service self-startup [root@oel6 ~] # cd / usr/local/mysql [root@oel6 mysql] # cp support-files/mysql.server / etc/init.d/mysqld [root@oel6 mysql] # chkconfig-add mysqld [root@oel6 mysql] # chkconfig-list mysqldmysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
10. Close MySQL database [root@oel6 bin] # mysqladmin-u root shutdownmysqladmin: connect to server at 'localhost' failederror:' Access denied for user 'root'@'localhost' (using password: NO)' [root@oel6 bin] # mysqladmin-u root-p shutdownEnter password: 2016-10-06T05:50:46.469848Z mysqld_safe mysqld from pid file / mysql/run/mysqld.pid ended [1] + Done mysqld_safe-- user=mysql
11. Start and stop MySQL through the service [root@oel6 bin] # service mysqld startStarting MySQL. [OK] [root@oel6 bin] # service mysqld stopShutting down MySQL. [OK]
twelve。 Log in to the non-default port MySQL [root@oel6 bin] # mysql-u root-P8000-h localhost-pEnter password: Welcome to the MySQL monitor. Commands end with; or\ g.
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.