gpt4 book ai didi

MySQL 错误、事件连接、拒绝访问、无权限

转载 作者:行者123 更新时间:2023-11-30 00:24:32 26 4
gpt4 key购买 nike

mysql> SELECT USER(),CURRENT_USER();

| USER() | CURRENT_USER() | apple@localhost | @localhost |1 row in set (0.00 sec)

mysql> SHOW GRANTS FOR 'apple'@'localhost';

ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'

--------------------
Connection:
Name: LOCAL
Host: localhost (UNIX socket)
Server: MySQL Community Server (GPL)
Version: 5.6.16
Login User: apple
Current User: @localhost

An unhandled exception occurred (Error executing 'SELECT PROCESSLIST_ID,IF (NAME = 'thread/sql/event_scheduler','event_scheduler',PROCESSLIST_USER) PROCESSLIST_USER,PROCESSLIST_HOST,PROCESSLIST_DB,PROCESSLIST_COMMAND,PROCESSLIST_TIME,PROCESSLIST_STATE,THREAD_ID,TYPE,NAME,PARENT_THREAD_ID,INSTRUMENTED,PROCESSLIST_INFO FROM performance_schema.threads WHERE TYPE <> 'BACKGROUND'' SELECT command denied to user ''@'localhost' for table 'threads'. SQL Error: 1142). Please refer to the log files for details.

我无法访问任何数据库功能,每当我尝试执行操作时都会收到拒绝错误。这是一个全新的安装,我是 MySQL 的新手,我查找了其他问题,但还没有找到一切都被拒绝的例子。

最佳答案

您是否尝试以 root 身份登录 mysql?您可以通过在终端中使用以下命令来做到这一点:

Shell> mysql --user=user_name --password=your_password db_name

关于MySQL 错误、事件连接、拒绝访问、无权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22987580/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com