如何在WAMP中更改phpmyadmin的root密码? [英] How to change root password of phpmyadmin in WAMP?

查看:80
本文介绍了如何在WAMP中更改phpmyadmin的root密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打开mysql控制台并编写了以下内容:

I opened mysql console and wrote the following :

SET PASSWORD FOR root@localhost = PASSWORD('temppass')  ;

现在,当我打开phpmyadmin时,它会显示对用户'root'@'localhost'的访问被拒绝(使用密码:NO)"

Now when I open phpmyadmin, it says "Access denied for user 'root'@'localhost' (using password: NO)"

我试图为root设置密码,并且在某个地方我们从控制台本身更改了root密码的地方读取了它,这与以前的版本不同,我们必须更改配置文件.

I was trying to set a password for root and I read it somewhere that we change root password from console itself, unlike previous versions where we had to alter the config files.

是否有任何有关更改root密码以保护数据库的详细教程?

Any detailed tutorial on changing root password to secure a database?

我是这一切的新手.谢谢你.

I'm new to all this. Thank you.

推荐答案

要更改xampp的默认mysql root 密码,请在 mysql 上键入以下内容控制台:

To change the default mysql root password on xampp, type the following on mysql console:

UPDATE mysql.user SET Password=PASSWORD('som3P@Ss') WHERE User='root'; 
FLUSH PRIVILEGES;

然后打开[XAMPP Installation Path] /phpmyadmin/config.inc.php 并将其修改为:

then open [XAMPP Installation Path] /phpmyadmin/config.inc.php and modify it to:

$cfg['Servers'][$i]['password'] = 'som3P@Ss';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

这篇关于如何在WAMP中更改phpmyadmin的root密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆