问题描述
在首次启动 MySQL 时成功设置后,出于安全原因,该页面提示我设置 ROOT 密码.
After successful setup on initial launch of MySQL, the page prompted me to set up ROOT password for security reasons.
设置密码后,我无法再访问 MySQL.错误是:
On setting the password, am no longer able to access MySQL. The error is:
1045 - Access denied for user 'root'@'localhost' (using password: NO)
在网上查了一下,并在 phpmyadmin 文件夹中的 config.inc.php 中尝试了以下选项:
Looked up on the net and tried the following options in the config.inc.php from the phpmyadmin foler:
将身份验证设置为http",以便提示输入用户名和密码
Set the authentication to "http" so that it prompts to enter the username and password
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
在配置文件中设置正确的密码
Set up the correct password in the config file
$cfg['Servers'][$i]['password'] = 'myPwd';
他们都没有工作.
有人可以建议访问 MySQL 的解决方法吗?我并不担心无法使用 root 帐户,但希望使用其他用户名对数据库进行 CRUD.
Can anyone suggest a workaround to access MySQL? Am not fussed about not being able to use the root account but would like to CRUD on the database using other username.
推荐答案
这是我的 phpmyadmin config.inc.php 文件:
here is my phpmyadmin config.inc.php file:
<?php
$i = 0;
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
?>
如果 Apache/PHP 与 MySQL 在同一台机器上运行,那应该就足够了.然后系统会提示您输入用户名和密码.输入 root 和您设置的密码.
That should be enough if Apache/PHP is running on the same machine as MySQL. Then you will be prompted for a username and password. Enter root and the password that you set.
这篇关于在 EasyPHP{WAMP} 中设置 root 密码后无法从 phpMyAdmin 访问 MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)