In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to install and configure MySQL5.7 under Ubuntu18.04". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "the installation and configuration of MySQL5.7 under Ubuntu18.04"!
I. installation
1. Install directly through the source
Sudo apt-get update
Sudo apt-get install mysql-server mysql-client
Sudo apt-get install libmysqlclient-dev
2. automatic installation in the whole process, and check after installation
Sudo netstat-atp | grep mysql
If a port is shown to be listening, the installation is complete and the mysql service has been started normally
2. Modify the initial root password
1. Connect to the MySQL server
Mysql-u root-p
2. After connecting to mysql, enter the following command to change the password:
Mysql > UPDATE mysql.user SET plugin= "mysql_native_password", authentication_string=PASSWORD ("abc456") WHERE user= "root"
Mysql > flush privileges
Mysql > exit
3. Restart the mysql service
Sudo service mysql restart
Allow root to log in remotely
1. Log in
Mysql-u root-p
Enter password: # enter the password you just set here
2. Update the host field of the root user to%
Mysql > UPDATE mysql.user SET host= "" WHERE user= "root"
Mysql > flush privileges
Mysql > exit
3. Restart mysql
Sudo service mysql restart
4. Bind public network listener IP
# modify the configuration of MYSQL service
Sudo vim / etc/mysql/mysql.conf.d/mysqld.cnf
Bind-address=0.0.0.0
# pay attention to opening the firewall port
Sudo ufw enable/disable # turn firewall on or off for more ufw-help view
# add allow rules
Sudo ufw allow 3306/tcp
# View added rules
Sudo ufw status
5. Uninstall
Sudo apt-get autoremove-purge mysql-server-5.7
Sudo apt-get remove mysql-server
Sudo apt-get autoremove mysql-server
Sudo apt-get remove mysql-common
Sudo apt-get remove libmysqlclient
Sudo apt-get remove mysql*
Dpkg-l | grep ^ rc | awk'{print $2}'| sudo xargs dpkg-P
At this point, I believe you have a deeper understanding of "the installation and configuration of MySQL5.7 under Ubuntu18.04". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.