In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "mysql 5.6 source code how to install", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "mysql 5.6 source code how to install" this article.
Create mysql users and user groups
Groupadd-g 701 mysql
Useradd-g mysql-m mysql-d / home/mysql
Mysql directory partition:
Mysql software directory: / mysql/installdir
Mysql data directory: / mysql/datadir/3306/data
Mysql log directory: / mysql/logdir/3306/ {bin_log,general_log,error_log,query_log}
Mkdir-p / mysql/installdir
Mkdir-p / mysql/datadir/3306/data
Mkdir-p / mysql/logdir/3306/bin_log
Mkdir-p / mysql/logdir/3306/general_log
Mkdir-p / mysql/logdir/3306/error_log
Mkdir-p / mysql/logdir/3306/query_log
Mkdir-p / mysql/installdir
Mkdir-p / mysql/datadir/3307/data
Mkdir-p / mysql/logdir/3307/bin_log
Mkdir-p / mysql/logdir/3307/general_log
Mkdir-p / mysql/logdir/3307/error_log
Mkdir-p / mysql/logdir/3307/query_log
Install the required packages:
Yum install-y cmake gcc gcc-c++ ncurses-devel bison zlib libxml openssl
Compile
Cmake\
-DCMAKE_INSTALL_PREFIX=/mysql/installdir\
-DINSTALL_DATADIR=/mysql/datadir/3306/data\
-DDEFAULT_CHARSET=utf8\
-DDEFAULT_COLLATION=utf8_general_ci\
-DEXTRA_CHARSETS=all\
-DWITH_SSL=yes\
-DWITH_EMBEDDED_SERVER=1\
-DENABLED_LOCAL_INFILE=1\
-DWITH_MYISAM_STORAGE_ENGINE=1\
-DWITH_INNOBASE_STORAGE_ENGINE=1\
-DWITH_ARCHIVE_STORAGE_ENGINE=1\
-DWITH_BLACKHOLE_STORAGE_ENGINE=1\
-DWITH_FEDERATED_STORAGE_ENGINE=1\
-DWITH_PARTITION_STORAGE_ENGINE=1\
-DMYSQL_UNIX_ADDR=/mysql/datadir/3306/data/mysql.sock\
-DMYSQL_TCP_PORT=3306\
-DENABLED_LOCAL_INFILE=1\
-DSYSCONFDIR=/etc\
-DWITH_READLINE=on
Installation:
Make & & make install
Instance initialization:
/ mysql/installdir/scripts/mysql_install_db-basedir=/mysql/installdir/-datadir=/mysql/datadir/3306/data-defaults-file=/mysql/datadir/3306/my.cnf
/ mysql/installdir/scripts/mysql_install_db-basedir=/mysql/installdir/-datadir=/mysql/datadir/3307/data-defaults-file=/mysql/datadir/3307/my.cnf
Enable mysql instance
. / mysqld_safe-- defaults-file=/mysql/datadir/3306/my.cnf &
. / mysqld_safe-- defaults-file=/mysql/datadir/3307/my.cnf &
Check to see if it starts
Ps-ef | grep mysql
Change the password:
Use mysql
UPDATE user SET Password = PASSWORD ('admin123') WHERE user =' root'
Flush privileges
Multi-instance login:
Mysql-uroot-padmin123-S / mysql/datadir/3306/data/mysql.sock
Mysql-uroot-padmin123-S / mysql/datadir/3307/data/mysql.sock
View the port number of the instance:
Mysql > show variables like 'port'
->
+-+ +
| | Variable_name | Value |
+-+ +
| | port | 3307 | |
+-+ +
1 row in set (0.00 sec)
The above is all the contents of the article "how to install the mysql 5.6Source Code". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.