在mysql中,显示数据库;命令没有列出我的所有数据库 [英] In mysql, the show databases; command doesn't list all of my databases

查看:64
本文介绍了在mysql中,显示数据库;命令没有列出我的所有数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用 HeidiSQL 访问我的所有数据库,但是如果我转到 mysql.exe 窗口并使用 show databases;11 个中只有 2 个出现.这些都是 127.0.0.1 上的数据库.关于原因的任何想法?

I can access all of my databases with HeidiSQL, but if I go to the mysql.exe window and use show databases; only 2 of them show up out of 11. These are all databases on 127.0.0.1. Any ideas on why?

推荐答案

您正在以 root 身份登录 HeidiSQL,因此它向您显示所有数据库,但您登录的是 mysql.exe 作为当前 Windows 用户(因为这是默认用户),所以它只向您显示该用户可以看到的数据库.如果您使用 --user=root --password=... 运行 mysql.exe,它将显示所有数据库.

You're logging into HeidiSQL as root, so it's showing you all databases, but you're logging into mysql.exe as the current Windows user (since that's the default), so it's only showing you the databases that that user can see. If you run mysql.exe with --user=root --password=..., it will show you all databases.

这篇关于在mysql中,显示数据库;命令没有列出我的所有数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆