设置 root 密码并使用 Instant Rails 后无法访问 PHPmyAdmin
想要开始使用 Ruby on Rails,所以我安装了 Instant Rails 并设置了 mysql 密码。问题是现在我无法访问 phpmyadmin。
从 Rails 控制面板,当我去配置>>时数据库(通过 PhpMyadmin)它打开 phpmyadmin 并显示消息
<前><代码>错误 MySQL 说: 文档 #1045 - 用户“root”@“localhost”的访问被拒绝(使用密码:没有)
当我在设置密码后使用 XAMPP 时,而不是直接在 phpmyadmin 中(就像没有密码一样),它会将我带到登录屏幕。对于即时导轨来说,情况并非如此。有人在第一次设置 mysql 密码并使用即时 Rails 包时遇到过这个问题吗?
Wanted to get started with Ruby on Rails so I installed instant rails and set up a mysql password. Problem is now I can't get access to phpmyadmin.
From the rails control panel, when I go to configure >> database (via PhpMyadmin) it opens up phpmyadmin with the message
Error MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password:
NO)
When I used to use XAMPP after setting a password instead of taking me directly within phpmyadmin (as it did without a password) it took me to the login screen instead. With instant rails that's not the case. Anyone had this problem when they first set a mysql password and using the instant rails package?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(13)
编辑您的 phpmyadmin config.inc.php 文件:
配置页面的路径为 wamp\apps\phpmyadmin3.4.5\config.inc.php
Edit your phpmyadmin config.inc.php file :
Path For Config Page is wamp\apps\phpmyadmin3.4.5\config.inc.php
请检查 phpmyadmin 目录中的 config.inc.php 中的以下行,将“AllowNoPassword”设置为“TRUE”
如果您的根帐户不使用任何密码,
Check following lines in config.inc.php in phpmyadmin directory
if your root account dont use any password set 'AllowNoPassword' to 'TRUE'
更改配置文件后尝试重新启动浏览器。
Try to restart your browser after changing the config file.
转到此目录“xampp/phpmyadmin”并打开
config.inc.php
文件。在 Mac 上,转到/Applications/XAMPP/xamppfiles/phpmyadmin
。然后根据您所需的要求更改并配置以下代码。它对我有用。我安装了 MySQL 和 XAMPP 并且工作成功。Go to this directory "xampp/phpmyadmin" and open
config.inc.php
file. On a Mac, go to/Applications/XAMPP/xamppfiles/phpmyadmin
. Then change and configure the below code with your desired requirements. It worked with me. I installed both MySQL and XAMPP and worked successfully.配置中丢失。
was missing from configuration.
我遇到了类似的问题并找到了一个简单的解决方法。
在
config.inc.php
中更改密码后,phpmyadmin
未启动,用户 xyz@localhost 的访问被拒绝分步解决方案:
config.inc
更改密码。在
config.inc.php
中将密码保留为空$cfg['服务器'][$i]['密码'] = '';
这将允许 phpmyadmin 无需密码即可打开。
USERS
下单击root->的editpriviliges
,然后更改密码。现在打开 config.inc.php 并为您在 phpmyadmin 中设置的用户设置相同的密码代码>
示例:
$cfg['Servers'][$i]['password'] = 'xyz@abc';
现在打开
phpmyadmin
就可以了!I faced similar problem and found an easy way out.
After changing the password in
config.inc.php
,phpmyadmin
did not start and message was access denied for user xyz@localhostStep by step solution:
config.inc
.in the
config.inc.php
keep the password blank$cfg['Servers'][$i]['password'] = '';
this will allow phpmyadmin to open without password.
USERS
clickeditpriviliges
for root->followed by change password.localhost/phpmyadmin
, it shows error access deniedNow open config.inc.php and set the same password for user that you set in
phpmyadmin
example:
$cfg['Servers'][$i]['password'] = 'xyz@abc';
Now open
phpmyadmin
and it works!!我在 phpmyadmin 中更改密码后遇到了同样的问题。我使用 xampp 和 windows。我在 phpmyadmin 中更改密码后显示“访问被拒绝”,然后在下面描述的更改后 phpmyadmin 显示空白页面。我尝试了这里给出的所有建议和组合,但问题仍然存在。我通过“config.inc.php”解决了这个问题,我在其中更改了这些行
,然后是最后一个关键 - 清除浏览器中的缓存!祝你好运。
I had same problem after i changed password in phpmyadmin. Iam usind xampp and windows. After i changed password in my phpmyadmin showed "access denied" and then after changes descripted below phpmyadmin showed blank page. I tried all advices and combinations given here, but problem still remained. I solved it through "config.inc.php", where i changed these lines
and then and final key - clear cache in your browser! good luck.
这个问题让我抓狂。浪费了一整天的时间后我解决了它。我用的是WAMP。
This problem made me crazy.After a full day of wasting time I fixed it. I'm using WAMP.
我有这个问题。我已经通过更改 phpmyadmin ini 文件配置来修复。
根据 xampp 文件夹结构,我在以下位置找到了 phpmyadmin 配置文件:
C:\xampp\phpMyAdmin\config.inc.php
只需更改这些行即可解决我的问题。
$cfg['Servers'][$i]['password'] = '';
到
$cfg['Servers'][$i]['password'] = 'password ';
谢谢!
I had this issues. I have fixed by changing phpmyadmin ini files configuration.
As per xampp folder structure I found phpmyadmin configuration file in this location:
C:\xampp\phpMyAdmin\config.inc.php
Just changing these line my problem solved.
$cfg['Servers'][$i]['password'] = '';
to
$cfg['Servers'][$i]['password'] = 'password';
Thank You !
检查 phpmyadmin 目录中的 config.inc.php 中的以下行
$cfg['服务器'][$i]['用户'] = 'root';
$cfg['服务器'][$i]['密码'] = '你的密码';
$cfg['服务器'][$i]['AllowNoPassword'] = false;
上面的内容对我有用。
编辑上面的文件后,我重新启动了 wamp,一切都很好
Check following lines in config.inc.php in phpmyadmin directory
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'yourpassword';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
The above worked for me.After editing the above file,i restarted the wamp and it was all fine
您有一个没有密码的 root 帐户。最好查看位于 phpmyadmin 目录中的conf 文件并检查密码。
You have a root account with no password. It would be best to have a look into the conf file located in your phpmyadmin directory and check with the password.
Rails-mysql-lost-password
如果您是 Rails 开发人员并且丢失了 mysql 的密码:
此答案与发生此行为的 Ruby on Rails 框架有关,
与 mysql 一起使用“rails 新项目名称
-d mysql"
答案在 GRANT 命令中在此处的第68行
基本上它执行了GRANT命令,其凭据与您当前的database.yml
匹配已经讨论了这个主题,行为将会得到改善,并且它被视为错误并报告。
rails-mysql-lost-password
If you are rails developer and you have lost password for mysql :
This answer is in connection with Ruby on Rails framework where this behavior occurred
using with mysql "rails new projectname
-d mysql"
the answer is in GRANT command on line 68 in here
basically it executed GRANT command with credentials matches your current database.yml
I have discussed this topic and behavior will improved and it is taken and reported as a bug.
我一直在寻找答案,但它真的很容易解决...
打开 XAMPP 应用程序 ->转到常规然后打开终端
执行以下命令:
mysqladmin --user=root --password=[OLD_PASSWORD] 密码 ""
但是如何设置 root 密码?而又不会失去对
phpmyadmin
的访问权限?I was looking for an answer but it's really easy to solve...
Open XAMPP App -> Go to General then open Terminal
execute the following command:
mysqladmin --user=root --password=[OLD_PASSWORD] password ""
But how to set a root password? without losing access to to
phpmyadmin
?