我知道标题看起来很眼熟,但没有。我正在开发一个web应用程序,运行它时,它说:拒绝用户'root'@'localhost‘的访问(使用密码: NO)。我搜索了一些网站,他们说我应该使用密码。因此,我使用mysql控制台更改了密码。用户'root'@'localhost‘(使用密码: YES)的消息访问被拒绝。当我重新进入mysql控制台并输入密码时,它会发出比关闭更响的声音。我拿到了这个活动日志:
日志名称:应用程序 资料来源:.NET运行时日期: 10/18/2015 7:12:51 PM事件ID: 1026任务类别:无级别:错误关键字:经典用户: N/A计算机:TOSHIBA描述:应用程序: MySQLWorkbench.exe框架版本: v4.0.30319描述:进程由于未处理的异常而终止。例外信息: System.Runtime.Remoting.Channels.Ipc.IpcServerChannel.StartListening(System.Object) at MySQL.Workbench.ApplicationInstanceManager.RegisterRemoteType(System.String) at MySQL.Workbench.ApplicationInstanceManager.CreateSingleInstance(System.String,System.String[],System.EventHandler
1) at MySQL.GUI.Workbench.Program.Main(System.String[]) Event Xml: 1026 2 0 0x80000000000000 537897 Application TOSHIBA-TOSH Application: MySQLWorkbench.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Runtime.Remoting.RemotingException Stack: at System.Runtime.Remoting.Channels.Ipc.IpcServerChannel.StartListening(System.Object) at MySQL.Workbench.ApplicationInstanceManager.RegisterRemoteType(System.String) at MySQL.Workbench.ApplicationInstanceManager.CreateSingleInstance(System.String, System.String[], System.EventHandler1) at MySQL.GUI.Workbench.Program.Main(System.String[])
有什么帮助吗?我卸载了所有的东西(wamp,mysql,dreamweaver,.)但还是有同样的问题。当我输入密码时,mysql工作台会给出这个错误。

。
我试着使用config.inc.php解决方案,但仍然一样。
发布于 2015-10-19 11:41:38
请遵循以下步骤:
转到mysql服务器控制台并遵循以下步骤:
Step1:打开您的配置文件,并在[mysqld]部分和保存文件中添加以下行。
skip-grant-tables
skip-networkingStep2:重新启动mysql服务,如果使用linux,可以使用下面的命令。
service mysqld restart Step3:现在通过以下命令连接mysql -
mysql -urootStep4:上面的命令将连接到mysql,并显示mysql提示符,如下所示-
mysql>Step5:现在更改根密码如下所示-
mysql> update mysql.user set password = password('root123') where user='root';
OR
mysql> update mysql.user set password = password('root123') where user='root' and host = 'localhost';
mysql> flush privileges;
mysql> exit;Step6:现在从配置文件中删除新添加的行,并按照step2重新启动mysql服务。
最后,现在您可以将您的web或phpmyadmin与根用户连接起来。
发布于 2015-10-19 06:23:32
也许本地主机的根用户没有访问DB所需的权限。
尝试在mysql控制台上运行以下命令:
GRANT ALL ON <yourdb>.* TO 'root'@'localhost';
FLUSH PRIVILEGES;https://stackoverflow.com/questions/33207727
复制相似问题