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.

posta un anno fa183 visualizzazioni
1 Risposta
1
Risposta accettata

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
ESPERTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande