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--
I don't know if you have any knowledge of similar articles about using binary to demonstrate the steps of MySQL installation, but I'm here to tell you a little bit about it today. If you are interested, let's take a look at the body. I'm sure you'll get something from using binary to demonstrate the steps of MySQL installation.
Prepare the installation environment:
System version:
[root@node2 ~] # cat / etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
Selinux shuts down:
[root@node2 ~] # getenforce
Disabled
Firewall off:
[root@node2 ~] # systemctl status firewalld.service
● firewalld.service-firewalld-dynamic firewall daemon
Loaded: loaded (/ usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
1. Install the dependency package
Yum install libaio-y
2. Download the MySQL binary installation package
Https://dev.mysql.com (community website)
Https://dev.mysql.com/downloads/file/?id=474755 (download page)
Download address:
Wget-p / opt/ https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz
Parameter description:-p download all files that display normally for the html page.
-p. / local saves all files and directories to the local specified directory.
3. Create a user
Useradd-s / sbin/nologin-M mysql
4. Extract, create a directory, and create a soft connection
Mkdir / opt/mysql/
Tar zxf / opt/mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz-C / opt/mysql/
Cd / usr/local/
Ln-s / opt/mysql/mysql-5.7.21-linux-glibc2.12-x86_64
5. Create database-related directories (for backup)
Mkdir-pv / data/mysql/mysql3306/ {data,logs,tmp}
6. Change the properties of related directories
Chown-R mysql.mysql / usr/local/mysql
Chown-R mysql.mysql / data
7. Create configuration-related files
Configuration file is: / etc/my.cnf
Cat > / etc/my.cnf > / etc/profile
Source / etc/profile
11. View the MySQL initial password
Grep "password" / data/mysql/mysql3306/data/error.log
2018-02-01T05:44:04.334666Z 1 [Note] A temporary password is generated for root@localhost: usXXw5x.zzfw (default login password)
12. Change the initial password
The initial password is: the q=usXXw5x.zzfw initialization password will not be the same each time
Log in to the database to change the password: 123456
Mysql-uroot-p initial password
Mysql > alter user user () identified by '123456'
Or:
Mysql > SET PASSWORD=PASSWORD ('123456')
Mysql > flush privileges
Note: the password here is changed to 123456. It is recommended that the password be complicated.
PASSWD=$ (grep 'password is' / data/mysql/mysql3306/data/error.log | awk' {print $NF}')
Mysql-uroot-p "$PASSWD"-- connect-expired-password-e "alter user user () identified by '123456;"
At this point, the binary installation of the MySQL database is complete, and you will enter a new data world.
What do you think of this article that demonstrates the steps of MySQL installation using binary? If you want to know more about it, you can continue to follow our industry information section.
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.