I can't remember the ID and name of Maria db.

0

I'm using an instance as an Amazon LightSail Ubuntu. But I can't remember Maria db's name and ID. I only remember the password. Please tell me how to check the db name and ID.

asked 10 months ago177 views
1 Answer
1
Accepted Answer

Once you're logged into the MariaDB command line, you can list all databases with the following SQL command:

SHOW DATABASES;

This will show you a list of all the databases on your MariaDB instance.

To list all users, you can use the following SQL command:

SELECT User,Host FROM mysql.user;

This will show you a list of all the user IDs and the hosts they're associated with.

profile picture
EXPERT
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions