首页 > 数据库 >MYSQL设置密码时显示Failed! Error: SET PASSWORD has no significance for user 'root'@'localhos

MYSQL设置密码时显示Failed! Error: SET PASSWORD has no significance for user 'root'@'localhos

时间:2023-05-23 18:23:50浏览次数:39  
标签:SET significance 密码 authentication mysql sudo root localhost

 用这个命令进入mysql

sudo mysql


在sql命令行输入以下命令回车,你就可以把密码改成mynewpassword

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'mynewpassword';


exit回到终端命令行,输入:

sudo mysql_secure_installation


输入刚才的密码即可。
出现的问题都选n.

 

标签:SET,significance,密码,authentication,mysql,sudo,root,localhost
From: https://www.cnblogs.com/2324hh/p/17426040.html

相关文章

  • MYSQL设置密码时显示Failed! Error: SET PASSWORD has no significance for user 'roo
    ​ 用这个命令进入mysqlsudomysql在sql命令行输入以下命令回车,你就可以把密码改成mynewpasswordALTERUSER'root'@'localhost'IDENTIFIEDWITHmysql_native_passwordby'mynewpassword';exit回到终端命令行,输入:sudomysql_secure_installation输入刚才的......
  • chatgpt问答- set +o history 是什么意思
    问:set+ohistory是什么意思答:在Unix和Linux系统中,set+ohistory是一个用于修改shell的行为的命令。具体而言,set+ohistory是用来禁用命令历史记录的。命令历史记录是shell保存用户在终端中输入的命令的功能。通过命令历史记录,用户可以使用向上和向下箭头键来浏览以前输入......
  • memset() 函数的使用
    //Lvxin1-1 memset.cpp //memset()函数的使用 #include<stdio.h>#include<string.h> intmain(){   charstr[]="almosteveryprogrammershouldknowmemset!";   doubled;   memset(&d,0,sizeof(d));   memset(str,'......
  • spm 一阶分析的Microtime onset应该如何填写?
    1.如果对数据进行了slicetiming,那么在进行一阶分析时应该修改microtimeonset和microtimeresolution这两个参数,假设数据的sliceorder=[1:2:472:2:46],referenceslice=47(中间层),那么microtimeonset=24,microtimeresolution=47(即slicenumber)参考来源:link: SPM/......
  • .net6中数据库查询报错:'OFFSET' 附近有语法错误。 在 FETCH 语句中选项 NEXT 的用法无
    错误语句:在数据库查询中使用skip()问题原因:数据库版本为SQLServer2008,不支持'Fetch'和'Next'语句SQLServer2012及后续版本才支持相关语句解决方法:1.引用包: System.Data.SqlClient和EntityFrameworkCore.UseRowNumberForPaging2.使用:在Program.cs中调整数据库连接bu......
  • Authentication plugin ‘caching_sha2_password‘ cannot be loaded
    用navicate登录mysql8.0时报错如下:Authenticationplugin‘caching_sha2_password‘cannotbeloade原因是mysql8之前的版本中加密规则是mysql_native_password,而mysql8之后,加密规则是caching_sha2_password。解决问题方法有两种,一种是升级navicat驱动,另一种是把mysql用......
  • Atcoder Grand Contest 060 D - Same Descent Set
    先推式子。设\(f(S)\)表示decent集合恰好为\(S\)的排列个数,\(g(S)\)表示\(S\)是\(p\)的decent集合的一个子集的排列\(p\)个数,\(g'(\{a_1,a_2,\cdots,a_k\})=\dfrac{n!}{a_1!(a_2-a_1)!(a_3-a_2)!\cdots(a_k-a_{k-1})!(n-a_k)!}\),那么有:\[\begin{aligned}ans=&\......
  • java学习日记20230522-TreeSet
    有序键值对集合publicclassTreeSetExercise{publicstaticvoidmain(String[]args){Integerinteger=newInteger(10);TreeSettreeSet=newTreeSet(newComparator(){@Overridepublicintcompare(Objecto1,Obj......
  • iOS 缩放等级 Set the Zoom Level of an MKMapView
    SettheZoomLevelofanMKMapViewhttp://troybrant.net/blog/2010/01/set-the-zoom-level-of-an-mkmapview/IfyouhaveeverbuiltawebapplicationusingtheGoogleMapsAPI,youarelikelyintimatelyfamiliarwiththislineofcode:map.set......
  • Failed to execute 'setSelectionRange' on 'HTMLInputElement'
    jcubic commented on7Jan2016WhenIusenumberinputI'vegoterrorinGoogleChromeUncaughtInvalidStateError:Failedtoexecute'setSelectionRange'on'HTMLInputElement':Theinputelement'stype('number')......