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
How to declare a cursor in mysql: 1. Declare vari...
Table of contents 1. Install JDK Manual Installat...
They are all web page templates from the foreign ...
1. Cause: I need to import a sql file, but I can&...
How to solve the timeout problem when pip is used...
1. Discover the problem © is the copyrigh...
Table of contents 1. Open WeChat Pay 1.1 Affiliat...
Flex layout is undoubtedly simple and easy to use...
When installing Docker on Windows 10, after selec...
/****************** * Kernel debugging technology...
<br />I have been working in front-end for s...
Ordered List XML/HTML CodeCopy content to clipboa...
As shown below: name describe character varying(n...
Table of contents Preface –link Custom Network As...
We often see a cool effect where the mouse hovers...