mysqlmysql-cli

Can't see MySQL database from terminal that I created on Workbench using "SHOW DATABASES"


I have recently downloaded MySQL community and MySQL workbench on my MacOs. I created database on workbench and I am able to do updates and work there.

But when I try to do for ex: "SHOW DATABASES from terminal I am not able to see the databases I have created using workbench

All the commands are working and are fine here in MySQL workbench

enter image description here

But at the same time, I am unable to see any of my databases that i created using workbench

enter image description here

This is not mine, but I expect to get similar output.

enter image description here


Solution

  • Use show databases; rather than show databases. MySQL uses ; to indicate the end of a statement, so you need to add ; after a statement. You lost the ; while using terminal.