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
Table of contents step 1. Configure routing rules...
1. MySQL gets the current date and time function ...
Set a background image for the table. You can use...
<br />Original text: http://andymao.com/andy...
Note: The third method is only used in XSell and ...
Get the local public IP address through the conta...
Preface PC Server has developed to this day and h...
Absolute length px px is the pixel value, which i...
Copy code The code is as follows: <!DOCTYPE ht...
Table of contents Base Return Type String and Boo...
Written in front When we operate the database in ...
Tables once played a very important role in web p...
1. Install mysql: udo apt-get install mysql-serve...
Preface First, let's see how to identify a TC...
1. Change password 1. Modify the password of ordi...