如何让 phpMyAdmin 连接到本地 mysql 服务器?

发布于 2024-07-14 11:31:15 字数 293 浏览 8 评论 0原文

我有 config.inc.php 文件,并将主机名设置为 localhost。 不幸的是,我不知道我的用户名/密码应该是什么。 这是我需要在 MySql 端配置的东西吗? 我尝试创建任意用户名/密码(admin/password),但是当我尝试使用这些凭据登录 phpMyAdmin 时,出现错误:(#1045 - 用户“admin”@“localhost”的访问被拒绝(使用密码:是的))

有人能指出我正确的方向吗? (抱歉这个愚蠢的问题;我之前只是没有安装过mysql。我一直有一个主机名/用户名/密码给我。)

谢谢!

I have my config.inc.php file, and have set my host name to localhost. Unfortunately, I have no idea what my username/password should be. Is that something I need to configure on the MySql side? I tried creating an arbitrary username/password (admin/password), but when I try to log into phpMyAdmin with those credentials, I get an error: (#1045 - Access denied for user 'admin'@'localhost' (using password: YES))

Can anyone point me in the right direction? (Sorry for the dumb question; I just haven't had to install mysql before. I've always had a host name / username / password given to me.)

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

极致的悲 2024-07-21 11:31:15

root,无密码。

$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed

root with no password.

$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
瑾夏年华 2024-07-21 11:31:15

这里你有mysql的默认权限,以及如何更改它们。

http://dev.mysql.com/doc/refman/ 5.0/en/default-privileges.html

here you have the default privileges in mysql, and how to change them.

http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

终陌 2024-07-21 11:31:15

你使用什么安装的mysql? 如果不知道的话,就很难知道。 我建议进行 wamp 安装并记住通常的“正常”安装使用用户名:root 并且没有密码

What installation of mysql are you using? Without knowing that its very hard to know. I would recommend getting the wamp installation and remembering that the usual "normal" installation uses user name: root and no password

枕头说它不想醒 2024-07-21 11:31:15

我以前也遇到过这个问题,你需要自己去配置文件中查找密码,因为 phpMyAdmin 的界面会对你隐藏密码。 这很痛苦......不幸的是我懒得自己安装它并找到它到底在哪里。

I had this problem before, you need to go and look up the password in the config files yourself, since phpMyAdmin's interface will hide the password from you. It's a pain... unfortunately I'm too lazy to install it myself and find exactly where it is for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文