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--
0. Environment:
Os: CentOS release 6.10 (Final)
Msyql: mysql8.0.14
1. Download the officially packaged binary installation package:
# wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.14-linux-glibc2.12-x86_64.tar.xz
8.0 uses the new .xz compression method, and the file is very small, only about 350m.
two。 Decompress:
Tar-xJvf mysql-8.0.14-linux-glibc2.12-x86_64.tar.xz
3. Put it under / usr/local
[root@iceman local] # ln-s mysql-8.0.14-linux-glibc2.12-x86_64 mysql
4. Configuration parameter file / etc/my.cnf
[mysqld]
Server-id = 1
Port = 3306
Datadir = / data/mysql
Socket = / tmp/mysql.sock
Pid-file = / tmp/mysqld.pid
Log-error = error.log
Slow-query-log = 1
Slow-query-log-file = slow.log
Long_query_time = 0.2
Log-bin = bin.log
Binlog_format = ROW
Character-set-client-handshake = FALSE
Character-set-server = utf8mb4
Collation-server = utf8mb4_unicode_ci
Init_connect = 'SET NAMES utf8mb4'
Innodb_buffer_pool_size = 200m
Join_buffer_size = 10m
Sort_buffer_size = 2m
Read_rnd_buffer_size = 2m
Log_timestamps = SYSTEM
5. Create users and directories
[root@iceman ~] # groupadd mysql
[root@iceman] # useradd-r-g mysql-s / bin/false mysql # # / bin/false means that login together is prohibited
[root@iceman] # mkdir-p / data/mysql
[root@iceman] # chown-R mysql:mysql / data/mysql/
[root@iceman] # chmod-R 775 / data/mysql/
6. Initialize the database: you can use-- initialize-insecure does not generate a password
[root@iceman bin] # pwd
/ usr/local/mysql/bin
[root@iceman bin] # / mysqld-- initialize-- user=mysql-- basedir=/usr/local/mysql-- datadir=/data/mysql
The following two problems are encountered during initialization, which can be installed with Yum.
. / mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
Yum-y install libaio
. / mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
Yum-y install numactl
7. Set up the startup file:
# cp / usr/local/mysql/support-files/mysql.server / etc/init.d/mysql
-- start the database:
# / etc/init.d/mysql start
Starting MySQL.Logging to'/ data/mysql/error.log'.
SUCCESS!
8. Modify environment variabl
# vim / etc/profile.d/mysql.sh
Export PATH=$PATH:/usr/local/mysql/bin
# source / etc/profile.d/mysql.sh
9. Modify the password
Mysql > show databases
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
Mysql >
Mysql >
Mysql > alter user root@localhost identified by'Hellxxxeiyunqualified customers'
Query OK, 0 rows affected (0.01 sec)
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.