In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the example analysis of mysql database service in Linux system. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
First of all, install CentOS7 and install mysql (YUM source mode) 1. Download the mysql source installation package $wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm2. Install the mysql source $yum localinstall mysql57-community-release-el7-8.noarch.rpm 3. Check whether the MySQL source is installed successfully $yum repolist enabled | grep "mysql.*-community.*" 4. Modify the yum source [skip] $vim / etc/yum.repos.d/mysql-community.repo to change the mysql version installed by default. For example, if you want to install version 5.6, change the enabled=1 of the 5.7source to enabled=0. Then change the enabled=0 of the 5.6 source to enabled=1. Note: enabled=1 indicates the mysql version to be installed, and this file may not be modified. The maximum mysql version 5. 0 is installed by default. The step of installing MySQL is the real installation of mysql$ yum install mysql-community-server6. Start the MySQL service and set boot $systemctl start mysqld$ systemctl enable mysqld$ systemctl daemon-reload7. Port open $firewall-cmd-- zone=public-- add-port=3306/tcp-- permanent$ firewall-cmd-- reload8. Modify root local login password note that if version 5.6 is installed, the default password is empty! 1) check the mysql password $grep 'temporary password' / var/log/mysqld.log2) Connect mysql$ mysql-uroot-p3) change the password [Note: the semicolon must follow] mysql > ALTER USER' root'@'localhost' IDENTIFIED BY 'MyNewPass4 password; or: mysql > set password for' root'@'localhost'=password ('MyNewPass4password'); mysql > show variables like'% password%' After successful installation, you need to set up host to access remotely-select mysql library mysql > use mysql;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-ADatabase changed- query hostmysql > select host from user +-+ | host | +-+ |% | 127.0.0.1 | |:: 1 | localhost | | monkey | | monkey | +-+ 6 rows in set (0.00 sec)-Update host to generic mysql > update user set host'% 'where user =' root';ERROR 1064 (42000): You have an error in your SQL syntax Check the manual that corresponds to your MySQL server version for the right syntax to use near'% 'where user =' root'' at line 1mysql > quitBye- restart Service [root@monkey /] # service mysqld restartRedirecting to / bin/systemctl restart mysqld.service this article on "sample Analysis of mysql Database Services in Linux system" ends here. I hope the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good. Please share it for more people to see.
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.