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--
Install the software dependency package
Yum-y install gcc gcc-c++ ncurses ncurses-devel cmake
Download the software package
Cd / usr/local/src
Wget https://downloads.mysql.com/archives/get/file/mysql-5.7.13.tar.gz-- no-check-certificate
Download the boost library, MySQL 5.7.5 starting Boost library is required
Cd / usr/local/
Wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz-- no-check-certificate
Tar zxvf boost_1_59_0.tar.gz
Create installation user
Useradd-M-s / sbin/nologin mysql
Create an installation directory
Mkdir-p / usr/local/mysql
Create a data directory
Mkdir / mysql3306
Create a profile directory
Mkdir-p / usr/local/mysql/etc
Create a database log directory
Mkdir-p / usr/local/mysql/logs
Compilation and installation
Cd / usr/local/src
Tar zxvf mysql-5.7.13.tar.gz
Cmake\
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\
-DMYSQL_DATADIR=/mysql3306/\
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock\
-DDEFAULT_CHARSET=utf8\
-DDEFAULT_COLLATION=utf8_general_ci\
-DEXTRA_CHARSETS=all\
-DENABLED_LOCAL_INFILE=1\
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DDOWNLOAD_BOOST=1\
-DWITH_BOOST=/usr/local/boost_1_59_0
Make & & make install
Generate configuration file
Create a profile directory
Mkdir-p / usr/local/mysql/etc
Cp support-files/my-default.cnf etc/my.cnf
Edit configuration file
Modify the permissions of the installation directory
Chown-R mysql:mysql / usr/local/mysql/
A startup script that copies a configuration file
Cp / app/mysql/mysql/support-files/mysql.server / etc/init.d/mysqld
Add the mysql command to the environment variable
Export PATH=$PATH:/usr/local/mysql/bin
Source / etc/profile
Initialize database settings
. / mysqld-- initialize-insecure
Start the database
/ etc/init.d/mysqld start
Database error report
/ etc/init.d/mysqld start
Starting MySQL.The server quit without updating PID file (/ [FAILED] l/mysql/mysqld.pid).
View error log
Solution method
Chown-R mysql:mysql / mysql3306
Log in and view the database. The installed database does not have a password by default.
Set a password for the database
After the version is updated, the password field in the original user has been changed to authentication_string
Log in to MySQL
Mysql > update mysql.user set authentication_string=password ('123qwe') where user='root' and Host =' localhost'
Query OK, 1 row affected, 1 warning (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 1
Mysql > flush privileges
Login authentication
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.