MySQL 在 phpmyadmin 中设置用户名和密码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11438323/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 14:08:25  来源:igfitidea点击:

Setting username and password in phpmyadmin

mysqlphpmyadmin

提问by Sam

I need to set the username and password in phpmyadmin for mysql.

我需要在phpmyadmin中为mysql设置用户名和密码。

I think the default username is root@localhost.

我认为默认用户名是 root@localhost。

I do not know how to set this.

我不知道如何设置。

回答by Drewness

The 'root' user would have been setup during the initial install. If you open the config.default.phpfile you will see

'root' 用户将在初始安装期间设置。如果你打开config.default.php文件,你会看到

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '********';

This information can be changed provided you are not using 'cookie' validation. Like this

如果您不使用“cookie”验证,则可以更改此信息。像这样

$cfg['Servers'][$i]['auth_type'] = 'cookie';

回答by xan

Open Cpanel

打开面板

Go To MySQLDatabases

转到 MySQL 数据库

Find MySQL Users

查找MySQL 用户

"Add new User"

“添加新用户”

Remember the username will be in the format domainname_username.

请记住,用户名的格式为 domainname_username。