In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Download the installation package
Wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
2. Decompress to / opt
[root@Master opt] # tar xvf mysql-5.7.22-linux-glibc2.12-x86_ 64.tar.gz [root @ Master opt] # lltotal 628712drwxr-xr-x. 9 root root 4096 Jul 6 19:47 mysql-5.7.22-linux-glibc2.12-x86_64-rw-r--r--. 1 root root 643790848 Jul 6 11:44 mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
3. Make soft link to / usr/local/mysql
[root@Master opt] # ln-s / opt/mysql-5.7.22-linux-glibc2.12-x86_64 / usr/local/mysql [root@Master opt] # ll / usr/local/total 40drwxr-xr-x. 2 root root 4096 Sep 23 2011 bindrwxr-xr-x. 2 root root 4096 Sep 23 2011 etcdrwxr-xr-x. 2 root root 4096 Sep 23 2011 gamesdrwxr-xr-x. 2 root root 4096 Sep 23 2011 includedrwxr-xr-x. 2 root root 4096 Sep 23 2011 libdrwxr-xr-x. 2 root root 4096 Sep 23 2011 lib64drwxr-xr-x. 2 root root 4096 Sep 23 2011 libexeclrwxrwxrwx. 1 root root 40 Jul 6 20:01 mysql- > / opt/mysql-5.7.22-linux-glibc2.12-x86_64drwxr-xr-x. 2 root root 4096 Sep 23 2011 sbindrwxr-xr-x. 5 root root 4096 Feb 16 2017 sharedrwxr-xr-x. 2 root root 4096 Sep 23 2011 src
4. Create a user
[root@Master opt] # groupadd mysql [root@Master opt] # useradd-g mysql-s / sbin/nologin-d / usr/local/mysql/-M mysql
5. Environmental variables
[root@Master opt] # echo PATH=$PATH:/usr/local/mysql/bin > > / etc/profile [root@Master opt] # source / etc/profile
6. Create the necessary directories
Mkdir-p / data/mysql/mysql3306/ {data,tmp,logs}
7. Generate my.cnf (automatically generated according to your own needs)
General Ye's profile generation tool
Http://imysql.com/my-cnf-wizard.html
8. Directory permissions
[root@Master /] # chown-R mysql:mysql / data/mysql/mysql3306/ [root@Master /] # chown-R mysql:mysql / usr/local/mysql
9. Database initialization
[root@Master /] # mysqld-defaults-file=/etc/my.cnf-initialize-user=user-basedir=/usr/local/mysql/-datadir=/data/mysql/mysql3306/data/
10. Database password (.lZ!-2t2-n9s)
[root@Master data] # more / data/mysql/mysql3306/data/dataerror.log2018-07-06T13:46:32.795821Z 1 [Note] A temporary password is generated for root@localhost: .lZ!-2t2-n9s
11. Start the database
[root@Master support-files] # pwd/usr/local/mysql/support-files [root@Master support-files] # cp mysql.server / etc/init.d/mysqld [root@Master support-files] # / etc/init.d/mysqld startStarting MySQL.. SUCCESS!
12. Log in to the database
Enter the password Starting MySQL.. for step 10 SUCCESS! [root@Master support-files] # mysql-uroot-pEnter password:Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 2Server version: 5.7.22-logCopyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.root@Master 21:57: [(none)] > root@Master 21:57: [(none)] > show databases;ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement
13. Change the root password
[root@Master support-files] # mysqladmin-uroot-p password 'root'Enter password: mysqladmin: [Warning] Using a password on the command line interface can be insecure.Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety
14. Log into the database
[root@Master support-files] # mysql-uroot-proot mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 5Server version: 5.7.22-log MySQL Community Server (GPL) Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c' to clear the current input statement.root@Master 22:01: [(none)] > show databases +-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | sys | +-+ 4 rows in set (0.00 sec)
Question:
Encountered an error error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory during initialization
Resolve:
Yum-y install numactl.x86_64
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.