Reputation: 349
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?
Upvotes: 20
Views: 42393
Reputation: 7
I had the same problem It seems that in never version you need to add semicolon at the end of the command.
SHOW DATABASES;
Work fine for me with lowercase and uppercase letters.
Upvotes: 0
Reputation: 42
If you are in a screen session, that can also truncate your results. Just thought I'd throw that out there since that's what my issue was that led me here ---
Upvotes: 0
Reputation: 53
First, you have to log in using your username and password before you issue show databases command on cmd. If you request show databases without this, cmd will only show you default databases. your username and password(optional if you username is root) grant you the needed access to the databases. This is my experience and I hope it helps.
Upvotes: 1
Reputation: 9908
in my case, SHOW DATABASES
or SHOW DATABASES;
didn't work.
what worked is:
show databases;
Upvotes: 19
Reputation: 1850
I am using Oracle mySql
mysql> show databases;
This command show all databases in your SQL server
Upvotes: 5
Reputation: 183251
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.
Upvotes: 28