如何更改 phpMyAdmin 中的权限
我正在尝试在本地主机上设置 magento,并且必须通过 phpmyadmin 为其创建一个数据库。无论如何,设置步骤之一是输入用户名和密码,但它不允许您将密码留空,所以我去更改了它。现在,我无法访问任何内容...不能访问 MAMP、phpMyAdmin、任何本地站点等。我似乎无法通过命令行更改权限。
我是我的计算机上的唯一用户。
I am trying to set up magento on my localhost, and had to create a database for it via phpmyadmin. anyways, one of the setup steps was to enter in a user name and password, but it wouldn't let you leave the password blank so I went and changed it. now, I can't access anything... not MAMP, phpMyAdmin, any local sites, etc. I can't seem to change permissions via the command line.
I am the only user on my computer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
phpMyAdmin 在同一目录中有一个配置文件,名为 config.inc.php 。在那里更改您的密码(假设您使用“配置”模式来记住密码)
phpMyAdmin has a config file located within the same directory, called config.inc.php . Change your password there ( given that you use "config" mode to memorize password )
打开命令行。
sudo mysql
然后
授予 * 上的所有权限。 * TO 'new_user'@'localhost';
其中new_user
是您的用户名然后
FLUSH PRIVILEGES;
就可以了PS:
exit
离开mysqlOpen command line.
sudo mysql
then
GRANT ALL PRIVILEGES ON * . * TO 'new_user'@'localhost';
wherenew_user
is your usernameThen
FLUSH PRIVILEGES;
and you're good to goPS:
exit
to leave mysql