Show MySQL Databases SSH

User
show all databases mysql ssh
Assistant
To **list all MySQL databases via SSH**, follow these steps:

### โœ… Step-by-step

1. **SSH into the server**:

ssh username@your_server_ip

Replace `username` and `your_server_ip` with your actual SSH credentials.

2. **Log into MySQL** (adjust `-u` and `-p` as needed):

mysql -u root -p

or if you're using a socket or a different user:

sudo mysql

3. **Show all databases** inside the MySQL prompt:

SHOW DATABASES;

4. **Exit MySQL**:

EXIT;

### ๐Ÿ”ง Example:

$ ssh admin@192.168.1.100
$ mysql -u root -p
Enter password:
mysql> SHOW DATABASES;

Let me know if you're using a custom port or need to connect via a specific user or Docker/DDEV setup.

Leave a Comment

Your email address will not be published. Required fields are marked *