Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure mysql 8.0.28 under ubuntu

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of "how to install and configure mysql 8.0.28 under ubuntu". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope this article "how to install and configure mysql 8.0.28 under ubuntu" can help you solve the problem.

Change the password for a long time. Record the installation process.

Install the ssh service:

Sudo apt-get install openssh-server

Start the ssh service:

Service sshd start

Install the mysql server side:

Sudo apt install-y mysql-server

Install the mysql client:

Sudo apt install-y mysql-client

After the installation is complete, follow the prompts to find the password file:

/ etc/mysql/debian.cnf

View the file as follows:

# Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhostuser = debian-sys-maintpassword = kYq3G8iSzqfXIXqbsocket = / var/run/mysqld/ mysqld.sock [MySQL _ upgrade] host = localhostuser = debian-sys-maintpassword = kYq3G8iSzqfXIXqbsocket = / var/run/mysqld/mysqld.sock

Modify the configuration file:

Sudo vim / etc/mysql/my.cnf

Add the following configuration:

[mysql] default-character-set=utf8 [mysqld] port=3306bind-address = 0.0.0.0skip-grant-tables

Restart the database

Sudo service mysql restart

Log in to mysql using the corresponding account and password

Mysql-udebian-sys-maint-pkYq3G8iSzqfXIXqb

Modify root password and host

Use mysql;grant all privileges on *. * to 'root'@'%' with grant option;update user set host='%', authentication_string='' where user='root'; ALTER USER' root'@'%' IDENTIFIED BY'1 'PASSWORD EXPIRE NEVER;ALTER USER' root'@'%' IDENTIFIED WITH mysql_native_password BY'1 flush PRIVILEGES;quit

Delete skip-grant-tables option after exit

As follows:

[mysql] default-character-set=utf8 [mysqld] port=3306bind-address = 0.0.0.0

Restart the mysql service

Sudo service mysql restart

Turn off the firewall

Sudo service ufw disable; # turn off firewall boot start sudo service ufw stop; # turn off firewall service

The navicat test link was successfully used on the host:

This is the end of the content about "how to install and configure mysql 8.0.28 under ubuntu". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report