<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:PunctuationKerning />
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
<w:ValidateAgainstSchemas />
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:SpaceForUL />
<w:BalanceSingleByteDoubleByteWidth />
<w:DoNotLeaveBackslashAlone />
<w:ULTrailSpace />
<w:DoNotExpandShiftReturn />
<w:AdjustLineHeightInTable />
<w:BreakWrappedTables />
<w:SnapToGridInCell />
<w:WrapTextWithPunct />
<w:UseAsianBreakRules />
<w:DontGrowAutofit />
<w:UseFELayout />
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<!--[if gte mso 10]>
<mce:style><!
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
-->
<!--[endif]-->
今天打开mantis,竟然出错了:
连接至数据库服务器失败;数据库返回的错误信息是:#1045: Access denied for user 'mantis'@'localhost' (using password:
YES)
在网上找一下,好像是说用户名和密码不对。
打开Mantis的配置文件config_inc.php,内容如下:
那么就要确定密码是否正确。在网上找一篇文说如何改密码《如何为用户设置密码(MYSQL)》如下:
原文如下:
当初次在机器上安装完Mysql时,你可以匿名进行访问数据库或者以不带口令的root身份进入数据库.另外如果你是一个管理员,你还要进行一些用户的建立及授权,这又涉及到设置密码的问题.下面我们就讨论一下如何设置密码: ?<!--[if !supportFootnotes]-->[1]<!--[endif]-->E/a?PB
B~p![q]3
首先我们应该知道Mysql数据库中的口令存储必须用password()函数加密它.因为在user表中是以加密形式存储口令,而不是作为纯文本.如果你没有加密,直接在数据库中执行以下语句: <DtS
zAXih7&WK
use mysql D22PGY>Rp
insert into user (host,user,password) values('%','user_name','your password'); W0LownKr
flush privileges; *IaB8CxV
网管网bitsCN_com
B)d~Ne+
相 信结果不会让你满意.因为服务器比较的是加密的值,所以服务器连接一定失败.这里需要说明的是flush privileges;这条命令起到了重新加载授权表.你也可以在shell下直接用mysqladmin -u root reload或者mysqladmin -u root
flush-privileges来实现重载授权表. YX9C4D}|~
4"/x9C,
在Mysql环境下,你可以使用以下语句进行设置密码: ssWFY1wx{q
ZQ{tHT'n]X
1.insert into user(host,user,password)
values('%','user_name',password("your password"); ^_UP>w2v;
gu$`ESsy
2.set password for user_name = password("your password") PYrJ 3cj
中国网管联盟www.bitscn.com
以上两种方法都必须进行重载授权表. $?dAs
.wR E<!--[if !supportFootnotes]-->
<!--[endif]-->T
3.当然你也可以在创建一个用户时直接设置密码,grant语句将为你自动加密口令. ^$A3RT0p
如 :grant all on *.* to user_name@% identified by
"your password"; /HKSW
另外你也可以在shell环境下用mysqladmin程序来设置密码
pN/:5N(/r
如: mysqladmin -u root password "your password"
把密码改了,还是不对,原来没有使用PASSWORD函数,再改一下:
update user set password=password("root") where
user="administrator";
这次出现了另外一个问题:
连接至数据库服务器失败;数据库返回的错误信息是:#1044:
Access denied for user 'mantis'@'localhost' to database 'mantis'
似乎数据库’mantis’找不到了。我在concole连接mysql server,也看不到数据库。难道数据库给重启时冲没了。怎样想都不对,感觉是运行错了数据库版本,再试试:
locate mysqld_safe
果然有两个版本,而/etc/init.d/mysql是错误的版本。执行“/var/lib/mysql/bin/mysqld_safe”,mantis终于又连上了。
分享到:
相关推荐
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决: 1.打开在创建mysql容器时挂载的conf目录下的mysqld.cnf(如下文件) 我创建docker的姿势 2.进入mysqlId.cnf文件中在...
Unhandled rejection SequelizeAccessDeniedError: Access denied for user 'lupeng'@'localhost' (using password: YES) 这是Node在使用Sequlize连接Mysql数据时报的错,关键看冒号后面的错误:访问拒绝,关键是...
MySQL密码忘了,可以进行重置设置。安全模式的进入,操作。
ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘python’ 2. 解决方法: 执行以下命令进入控制台: mysql –user=root -p 输入root用户的密码即可进入mysql控制台: 创建数据库: ...
首先是不知道怎么忽然mysql用命令行,workbench都登录不了,都提示’Access denied for user ‘root’@’localhost’。 数据库卸载重装了几次都不行。好像感觉数据清理不干净。解决的过程遇到的坑,这里记录分享下。...
主要给大家介绍了关于Linux连接mysql数据库报错:Access denied for user ’root‘@’localhost‘(using password: YES)的解决方法,文中通过示例代码介绍的非常详细,需要的朋友可以参考借鉴,下面随着小编来一起...
Mysql中添加用户之后可能出现登录时提示ERROR 1045 (28000): Access denied for user的错误.
昨天连数据库没有问题,但是今天连接数据库就报这个错误了,网上也搜了不少的方法,有一个方法解决了我的问题。我的环境是Linux 步骤:首先需要跳过密码认证,在Linux环境中找到/etc/my.cnf文件,在文件中找到...
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 提示的是用户访问被拒绝,原因是密码不正确,但是我们明明配置的是正确的密码,原因就在yml中: spring: datasource: ...
主要介绍了Linux下数据库报ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)实用解决方案,希望能对大家有帮助。
前言 最近学习linux,然后将win换成了ubuntu。之前安装的mysql也不能用了,现在将在ubuntu18.0.4上安装mysql并将...登录时出现ERROR 1698 (28000): Access denied for user ‘root’@‘localhost’。这应该时我们之前
主要介绍了mysql Access denied for user ‘root’@’localhost’ (using password: YES)解决方法,本文给出详细的解决步骤及操作注释,需要的朋友可以参考下
Access denied for user 'root'@'localhost' (using password: YES) 在网上找了很多解决办法,但是基本只有一个,在.ini文件中的mysqld条目添加 skip-grant-tables 然后重启服务器,再按照刚刚的步骤再来一遍(最后...
解决办法 1.打开/etc/mysql/debian.cnf文件,修改其只读属性 chmod 777 debian.cnf 可以看到里面存储了系统管理员的密码。 2. 用udebian-sys-maint账号登录MySQL mysql -udebian-sys-maint -p 再输入对应debian.cnf里...
MySQL ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO) 的解决办法和原因 这两天下载了MySQL5.7.11进行安装,发现到了初次使用输入密码的时候,不管怎样都进不去,即使...
主要介绍了mysql下提示ERROR 1044 (42000): Access denied for user ''@'localhost' to database,需要的朋友可以参考下
主要给大家介绍了如何解决mysql在创建数据库后出现:Access denied for user 'root'@'%' to database 'xxx'的错误提示,文中介绍的非常详细,需要的朋友可以参考借鉴,下面来一起看看吧。
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) 第一步:编辑mysql安装目录中的配置文件my.ini,在[mysqld]这个条目下加入 skip-grant-tables 如下图: 保存退出后 第二...