简体   繁体   English

mysql> 使用 mysql; 但是......错误1044(42000):用户''@'localhost'对数据库'mysql'的访问被拒绝

[英]mysql> use mysql; but … ERROR 1044 (42000): Access denied for user '' @ 'localhost' to database 'mysql'

using mysql.exe I enter the command mysql> use mysql;使用 mysql.exe 我输入命令 mysql> use mysql; but there is an error:但有一个错误:

ERROR 1044 (42000): Access denied for user '' @ 'localhost' to database 'mysql'错误 1044 (42000):用户 ''@'localhost' 对数据库 'mysql' 的访问被拒绝

  • What does this mean?这是什么意思?
  • How so I can access a mysql database?我如何才能访问 mysql 数据库?
  • The most important thing is that I want to reset password mysql database, but an error occurs when I enter the command: mysql> use mysql;最重要的是我想重置mysql数据库的密码,但是输入命令时出现错误:mysql> use mysql;

thanks all, finally I found this reset root password with wrong mysql config … and it works well for me :)谢谢大家,最后我发现这个重置 root 密码的 mysql 配置错误......它对我来说效果很好:)

-Go to your xampp\\mysql\\bin\\ folder - 转到您的 xampp\\mysql\\bin\\ 文件夹
-Edit my.ini and insert skip-grant-tables below [mysqld] - 编辑 my.ini 并在[mysqld]下面插入skip-grant-tables
-Restart MySQL -重启MySQL
-Set new password for your root user by running UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root' in phpMyAdmin in the mysql database (or just leave it like this if MySQL cannot be accessed from remote hosts) - 通过运行UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root'在 mysql 数据库中的 phpMyAdmin 为您的 root 用户设置新密码(或者如果 MySQL 无法从远程主机访问,就保持这样)

AndreKR安德烈KR

首先授予用户所有权限,

GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost' WITH GRANT OPTION;

Open MySQL interface (phpMyadmin) through browser then通过浏览器打开 MySQL 界面 (phpMyadmin) 然后

  1. click Users点击用户
  2. check users with grant options if it is no then follow below steps如果不是,请检查具有授权选项的用户,然后按照以下步骤操作
  3. click->edit privileges (if user with 'no' grant option)单击-> 编辑权限(如果用户具有“否”授予选项)
  4. then select (global privileges) mark check all然后选择(全局权限)标记检查所有
  5. continue these steps to all users对所有用户继续这些步骤

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误1044(42000):用户'@'localhost'对数据库'mysql'的访问被拒绝 - ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql' MySQL 1044(42000):使用Mac对用户'@'localhost'到数据库'mysql'的访问被拒绝 - MySQL 1044 (42000): Access denied for user ' '@'localhost' to database 'mysql' with Mac 错误 1044 (42000):拒绝用户 'root'@'localhost' 访问数据库 (MySQL - MariaDB) - ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database (MySQL - MariaDB) `1044 (42000): 用户 'user_admin'@'%' 对数据库 'mysql' 的访问被拒绝 - `1044 (42000): Access denied for user 'user_admin'@'%' to database 'mysql'` 如何使用命令提示符创建mysql数据库? 我收到错误ERROR 1044(42000):用户''@ localhost'拒绝访问数据库'ivs' - How to create mysql database using command prompt? I'm getting error ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'ivs' Mysql在console / phpmyadmin上显示错误:错误1044(42000):用户'root'@'localhost'对数据库'test123'的访问被拒绝 - Mysql showing error on console/phpmyadmin : ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'test123' mysql:第41行的错误1044(42000):用户的访问被拒绝 - mysql: ERROR 1044 (42000) at line 41: Access denied for user Mysql和Putty - ERROR 1044(42000):拒绝用户访问 - Mysql and Putty - ERROR 1044 (42000): Access denied for user 错误1044(42000):用户''@localhost对数据库的访问被拒绝 - ERROR 1044 (42000) : Access denied for user ' '@localhost to database 错误 1044 (42000):用户 'root'@'localhost' 对数据库 'newdb' 的访问被拒绝 - ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'newdb'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM