In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to achieve mysql rpm compilation configuration + remote access, I believe that most people do not understand, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
First check to see if other versions of mysql have been installed
[root@iZ2337trt88Z MySQL] # rpm-qa | grep MySQL / / this command will check whether the mysql database is installed on the operating system.
If so, we will uninstall it through the rpm-e command or the rpm-e-- nodeps command.
[root@iZ2337trt88Z MySQL] # rpm-e mysql / / normal delete mode
[root@iZ2337trt88Z MySQL] # rpm-e-- nodeps mysql / / forcefully delete mode. If you use the above command to delete other dependent files, you can use this command to delete them.
After the deletion, we can use the command rpm-qa | grep mysql to see if the mysql has been uninstalled successfully.
Download the corresponding version of the rpm installation package through the official website.
Official website address: http://dev.mysql.com/downloads/workbench/
What the blogger downloaded is
MySQL-5.6.31-1.el6.x86_64.rpm-bundle.tar
MySQL-shared-compat-5.6.31-1.el6.x86_64.rpm
Extract the ".tar" file:
[root@iZ2337trt88Z MySQL] # tar-xvf MySQL-5.6.31-1.el6.x86_64.rpm-bundle.tar
After successful decompression, rpm command to install:
[root@iZ2337trt88Z MySQL] # rpm-ivh MySQL-server-5.6.31-1.el6.x86_64.rpm
[root@iZ2337trt88Z MySQL] # rpm-ivh MySQL-client-5.6.31-1.el6.x86_64.rpm
[root@iZ2337trt88Z MySQL] # rpm-ivh MySQL-devel-5.6.31-1.el6.x86_64.rpm
[root@iZ2337trt88Z MySQL] # rpm-ivh MySQL-shared-compat-5.6.31-1.el6.x86_64.rpm / / the rpm file here is the one downloaded separately
After the installation is successful, you can start mysql:
[root@iZ2337trt88Z MySQL] # / etc/init.d/mysql start
Mysql-related file paths installed through rpm:
/ var/lib/mysql database file
/ usr/share/mysql commands and configuration files
/ usr/bin (mysqladmin, mysqldump, etc.)
Next is the use of mysql, the default root login, you can change the password
This is only used by the local server, but in practice, it is generally connected remotely through a third-party tool like Navicat. At the beginning, the blogger granted permissions by adding users, but still failed to connect, wondering if the permission command operation failed and messed up all morning.
Finally, it was found that there was a problem with the firewall.
How to add user permissions bloggers sort out another way to find du Niang:
The first command: add a user test and authorize access through the local machine (localhost) with a password of "123456".
The second command: add a user test and authorize access that can be initiated from any other host (wildcard%). You can use this statement.
Mysql > grant all privileges on *. * to test@localhost identified by '123456' with grant option
Mysql > grant all privileges on *. * to test@ "%" identified by '123456' with grant option
Of course, don't forget that the update permission will take effect immediately.
Mysql > flush privileges
Here are all user permissions. Here are the operations of the firewall:
[root@iZ2337trt88Z MySQL] # vi / etc/sysconfig/iptables
Add a message to release port 3306:
-An INPUT-p tcp-m state-- state NEW-m tcp-- dport 3306-j ACCEPT / / Note where the content is added in front of the icmp
These are all the contents of the article "how mysql implements rpm compilation configuration + remote access". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.