In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following content mainly brings you how to install mysql version 5.7.21 database in linux system. The knowledge mentioned is slightly different from books. It is summarized by professional technicians in the process of contacting users. It has certain experience sharing value and hopes to bring help to readers.
1. Download the database version
mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz
2. Decompression
tar -zxvf mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz
mv mysql-5.7.21-linux-glibc2.12-x86_64 mysql
3. Initialize the database
5.7 Initialize differently than previous versions
mkdir /ghca/mysql/data
mkdir /ghca/mysql/log
install numactl yum install numactl
./ mysqld --initialize --user=mysql --basedir=/ghca/mysql/ --datadir=/ghca/mysql/data
2018-03-29T06:44:18.994928Z 0 [Warning] [MY-011070] Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it is deprecated and will be removed in a future release.
2018-03-29T06:44:18.995070Z 0 [System] [MY-010116] /ghca/mysql/bin/mysqld (mysqld 8.0.4-rc) starting as process 23100 ...
2018-03-29T06:44:23.952948Z 0 [Warning] [MY-010068] CA certificate ca.pem is self signed.
2018-03-29T06:44:24.389231Z 5 [Note] [MY-010454] A temporary password is generated for root@localhost: Y%7923Moc7dd
Copy mysql.server to/etc/init.d/
cp support-files/mysql.server /etc/init.d/mysql
modify the configuration file
cat my.cnf
[client]
port = 3306
socket =/ghca/mysql/mysql.sock
[mysqld]
port = 3306
user = mysql
character-set-server = utf8
#default_storage_engine = innodb
log_timestamps = SYSTEM
socket =/ghca/mysql/mysql.sock
basedir =/ghca/mysql/
datadir =/ghca/mysql/data
pid-file =/ghca/mysql/data/mysql.pid
max_connections = 1000
max_connect_errors = 1000
table_open_cache = 1024
max_allowed_packet = 128M
open_files_limit = 65535
#####====================================[innodb]==============================
innodb_buffer_pool_size = 1024M
innodb_file_per_table = 1
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_purge_threads = 2
innodb_flush_log_at_trx_commit = 1
innodb_log_file_size = 512M
innodb_log_files_in_group = 2
innodb_log_buffer_size = 16M
innodb_max_dirty_pages_pct = 80
innodb_lock_wait_timeout = 30
innodb_data_file_path=ibdata1:1024M:autoextend
#####====================================[log]==============================
log_error =/ghca/mysql/log/mysql-error.log
slow_query_log = 1
long_query_time = 1
slow_query_log_file =/ghca/mysql/log/mysql-slow.log
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
4. Add boot automatic start
chkconfig --add mysql
chkconfig mysql on
service mysql start
5, do not know the root password operation steps
1. Stop MySQL
2、./ mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3. Log in to mysql
mysql
mysql> update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
mysql> flush privileges;
6. After the database installation is completed, it cannot be started.
service mysql start
Starting MySQL. ERROR! The server quit without updating PID file (/ghca/mysql/data/mysql.pid).
Modify my.cnf file permissions
chmod 775 /ghca/mysql/my.cnf
service mysql start
my_print_defaults: [Warning] World-writable config file '/ghca/mysql/my.cnf' is ignored.
Starting MySQL.my_print_defaults: [Warning] World-writable config file '/ghca/mysql/my.cnf' is ignored.
my_print_defaults: [Warning] World-writable config file '/ghca/mysql/my.cnf' is ignored.
SUCCESS!
For the above on how to install mysql 5.7.21 version of the Linux system database, if you still need to know more can continue to pay attention to our industry push new, if you need to get professional answers, you can contact the official website pre-sales after-sales, I hope this article can bring you a certain knowledge update.
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.