The installation of MySQL 5.7 on Ubuntu 1804 is introduced in detail. Execute the command to install MySQL sudo apt install mysql-server sudo apt install mysql-client After installation, check whether it is started: sudo ps aux | grep mysql If it has been started, you can see the corresponding information after executing the above command. If it has not been started, you can execute the following command to start mysql: sudo service mysql start In addition, you will need to restart MySQL later. The commands to restart and shut down MySQL are: sudo service mysql restart sudo service mysql stop After ensuring that mysql is started successfully, you can log in to mysql. However, there is no step to prompt for a username and password during the installation process. At this time, you can view the default username and password in '/etc/mysql/debian.cnf': sudo cat /etc/mysql/debian.cnf You can log in to mysql with user and password: mysql -udebian-sys-maint -pZBms1EM5icCfeePV However, the default username and password are hard to remember. You can use the following SQL statement to add a user named my_name with a password my_password: show databases; use mysql; update user set authentication_string=PASSWORD("my_password") where user='my_name'; update user set plugin="mysql_native_password"; flush privileges; exit; After adding the user, restart mysql and log in with my_name. Summarize The above is the problem and solution of not prompting for password when installing MySQL in Ubuntu 18.04. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: MySQL compressed package version zip installation configuration method
>>: Detailed tutorial for installing mysql 8.0.12 under Windows
Negative distance refers to empathy. Preface (rai...
This situation usually occurs because the Chinese...
When we want to add a shadow to a rectangle or ot...
Preface In our daily work, we often need to renam...
1. The Chinese garbled characters appear in MySQL...
Enter Alibaba vector icon library Alibaba Vector ...
Table of contents 1 Install Docker 2 Configuring ...
Network Communication Overview When developing an...
Preface InnoDB stores data in tablespaces. In the...
Table of contents Preface condition Install Docke...
Table of contents 1. Overview 1.1 Usage of queryS...
Preface In the last issue, we explained LinearLay...
Nginx is used as the server, Mongo is used as the...
Preface A reverse proxy is a server that receives...
What is vuex vuex: is a state manager developed s...