In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Binary deployment is relatively simple, and there is no need to install dependent environment. You can download the MySQL binary package from the mysql official website. Or download through the link of my network disk, where there is an automatic deployment script.
1. Uninstall mariadb [root@mysql01 ~] # yum-y erase mariadb [root@mysql01 ~] # rpm-e qt-mysql-4.8.7-2.el7.x86_64-- nodeps2, Deploy mysql 5.7 [root@mysql01 src] # tar zxf mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz [root@mysql01 src] # mv mysql-5.7.28-linux-glibc2.12-x86_64 / usr/local/mysql [root@mysql01 src] # ln-sf / usr/local/mysql/bin/* / usr/local/bin/3, Edit the configuration file and initialize MySQL [root@mysql01 src] # rm-rf / etc/my.cnf [root@mysql01 src] # vim / etc/my.cnf # Edit MySQL main configuration file [mysqld] basedir=/usr/local/mysqldatadir=/usr/local/mysql/datapid-file=/usr/local/mysql/data/mysqld.pidlog-error=/usr/local/mysql/data/mysql.errsocket=/tmp/mysql.sock [client] socket=/tmp/mysql.sock# creation required Directory and user and change owner [root@mysql01 src] # mkdir / usr/local/mysql/data [root@mysql01 src] # useradd-M-s / sbin/nologin mysql [root@mysql01 src] # chown-R mysql.mysql / usr/local/mysql/# initialize MySQL [root@mysql01 src] # mysqld-- initialize-- user mysql-- basedir=/usr/local/mysql/-- datadir=/usr/local/mysql/data# add as system service [root@mysql01 src] # cp / usr/local/mysql/support-files/mysql.server / etc/init.d/mysqld [root@mysql01 src] # chkconfig-- add mysqld# starts and sets to boot [root@mysql01 src] # systemctl enable mysqld [root@mysql01 src] # systemctl start mysqld# to determine that port 3306 is listening [root@mysql01 src] # netstat-anpt | grep 3306tcp6 00: 3306: * LISTEN 2589/mysqld 4 、 Modify MySQL's root user initial password # get root user's initial password [root@mysql01 src] # mysqlpwd= `cat / usr/local/mysql/data/mysql.err | grep password | awk-F'root@localhost:'{print $2}'`# reset password to 123.com [root@mysql01 src] # mysql-p$ {mysqlpwd}-e 'alter user root@localhost identified by "123.com'-connect-expired-password# uses the new password Login test [root@mysql01 src] # mysql-uroot-p123.com# add: the help command in MySQL uses mysql > help show # this command shows that all show commands use syntax, and you can help+ any command word
-this is the end of this article. Thank you for reading-
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.