Preface I recently learned Linux, and then changed Win to Ubuntu. The previously installed mysql is no longer usable. Now I will install mysql on ubuntu18.0.4 and record the problems encountered as follows: Download and install mysql Execute the statement Because I have already installed it here, this will happen. You can view the installed version through mysql --version. Login to mysql Execute the statement -u is user and -p is port. When logging in, ERROR 1698 (28000): Access denied for user 'root'@'localhost' occurs. This should be caused by forgetting the password or not remembering the initialization password when we installed it before: Here's how to solve this problem: 1. Enter the command The debian-sys-maint account is the MySQL user automatically generated by the system when MySQL is installed, and the corresponding password is the password of this user. 2. Log in to the account debian-sys-maint: 3. Change the root account password: Enter the command use mysql; Then enter the command: UPDATE user SET authentication_string=PASSWORD('The password you want to set') where USER='root'; This is to set the password for the root account. Then enter the command quit to exit mysql, and execute the restart mysql command sudo service mysql restart; Then log in to mysql, and when executing mysql -u root -p, I still get an error: ERROR 1524 (HY000): Plugin 'msyql_native_password' is not loaded At this time, the password has actually been changed successfully. The field of plugin root is auth_socket, which needs to be changed. 4. Modify plugin: Continue to log in using Execute the command: Execute the command: Then execute the command: update user set authentication_string =password('the password you want to set'),plugin='mysql_native_password' where user='root'; Finally, exit and restart mysql: Summarize The above is what I introduced to you about installing MySQL in Ubuntu 18.0.4 and solving ERROR 1698 (28000): Access denied for user 'root'@'localhost'. I hope it will be helpful to you. 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! If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you! You may also be interested in:
|
>>: Node implements search box for fuzzy query
MySQL 8.0 compressed package installation method,...
exhibit design Password strength analysis The pas...
Effect demo.html <html> <head> <me...
1. Build the basic image of jmeter The Dockerfile...
In this article, we would like to share with you ...
Preface The "destructuring assignment syntax...
Table of contents 1.1. Network access between con...
Note: This article is about the basic knowledge p...
The solution to forgetting the initial password o...
This article uses an example to describe how to r...
1. Write a simple Java program public class tests...
This article uses examples to illustrate the func...
Table of contents 1. What is a closure? 1.2 Memoi...
<div id="root"> <h2>Keep go...
<br />A great blog post by PPK two years ago...