当前位置:网站首页>Yyds dry goods inventory ubuntu18 0.4 install MySQL and solve error 1698: access denied for user ''root' '@' 'localhost' '
Yyds dry goods inventory ubuntu18 0.4 install MySQL and solve error 1698: access denied for user ''root' '@' 'localhost' '
2022-04-23 09:23:00 【Swiss cabbage】
Recent learning linux, And then win Instead of ubuntu. Previously installed mysql It can't be used , Now it will be in ubuntu18.0.4 Installation on mysql And record the problems encountered as follows :
Download and install mysql
Execute statement sudo apt-get install mysql-server
Because I have installed it here , So this will happen . Can pass mysql –version Check the installed version .
Sign in mysql
Execute statement mysql -u root -p
Its -u yes user -p Is the port . Appears at login ERROR 1698 (28000): Access denied for user ‘root’@‘localhost’. This should be when we installed ,pass Forget or don't remember to initialize pass Caused by the :
Now let's talk about how to solve this problem :
1. Input instruction sudo vim /etc/mysql/debian.cnf
We will see the following information :
among debian-sys-maint Account is installed mysql The system automatically generates mysql user , Corresponding pass This is the user's pass.
2. Login account debian-sys-maint:
mysql -u debian-sys-maint -p
You can log in. mysql:
3. modify root Account number pass:
Input instruction use mysql;
Then enter the command :
UPDATE user SET authentication_string = PASSWORD( ‘ What you want to set pass ') where USER=‘root'; This is the setup root account pass.
- 1.
Then enter the command quit, sign out mysql, restart mysql Instructions sudo service mysql restart;
Then login mysql, When executed mysql -u root -p, Found or reported wrong :ERROR 1524 (HY000): Plugin ‘msyql_native_password’ is not loaded
Now pass In fact, it has been modified successfully , yes plugin root The field of is auth_socket, It needs to be modified .
4. modify plugin:
Continue to use debian-sys-maint
Account login ;
Execution instruction :
use mysql
Execution instruction :
select user,plugin from user;
Then execute the instructions :
update user set authentication_string = password( ‘ What you want to set '),plugin=‘mysql_native_password' where user = ‘root ';
- 1.
Finally, exit and restart mysql that will do :
版权声明
本文为[Swiss cabbage]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230757551417.html
边栏推荐
- 112. Path sum
- Go language self-study series | golang nested structure
- Matlab draw five-star red flag
- [geek challenge 2019] havefun1
- NPM reports an error: operation not allowed, MKDIR 'C: \ program files \ node JS \ node_ cache _ cacache’
- Redis Desktop Manager for Mac
- Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem
- MySQL of database -- overview and installation
- 数据清洗 ETL 工具Kettle的安装
- Canary publishing using ingress
猜你喜欢
NPM reports an error: operation not allowed, MKDIR 'C: \ program files \ node JS \ node_ cache _ cacache’
Vivo, hardware safe love and thunder
Four pictures to understand some basic usage of Matplotlib
3、 6 [Verilog HDL] gate level modeling of basic knowledge
MySQL of database -- overview and installation
数据清洗 ETL 工具Kettle的安装
成功的DevOps Leader 应该清楚的3个挑战
653. 两数之和 IV - 输入 BST
Open services in the bottom bar of idea
Go language learning notes - language interface | go language from scratch
随机推荐
Canary publishing using ingress
ATSS(CVPR2020)
Go language self-study series | golang structure pointer
SQL used query statements
Non duplicate data values of two MySQL query tables
DJ music management software pioneer DJ rekordbox
Strength comparison vulnerability of PHP based on hash algorithm
GoLand debug go use - white record
npm ERR! network
Number theory to find the sum of factors of a ^ B (A and B are 1e12 levels)
Node installation
小程序报错 :should have url attribute when using navigateTo, redirectTo or switchTab
[reading notes] Chapter 5 conditional statements, circular statements and block statements of Verilog digital system design tutorial (with answers to thinking questions)
Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem
tsdf +mvs
机器学习(六)——贝叶斯分类器
Codeforces Round #784 (Div. 4)
DMP engine work summary (2021, lightsaber)
What is augmented reality technology? Where can it be used?
501. 二叉搜索树中的众数