Connected a database to MySQL after connecting to Apache Web Server. One problem

Viewed 27

After finally connecting, I typed 'show databases;' just to confirm that the database I created (on AWS) was connected but it doesn't pop up. Every other video I've watched doesn't seem to point out any step I may have missed. It only shows the 4 databases which I'm assuming were already there. Apologies if I'm not phrasing this question very clearly. Still a rookie self learning.

For some context, I'm on Windows and ssh through Gitbash. Also using a Red Hat instance. Tried to use an Amazon Linux 2 instance but encountered the same problem.

Here's what it shows:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

Every tutorial I've seen shows '5 rows in set(0.00sec)' with the one extra row being the name of the database created earlier. Any help would be appreciated.

1 Answers

You have to explicitly define your database in RDS when you create your mysql. This is in Additional configuration. By default no custom database is created:

enter image description here

But you can always use SQL to create it afterwards in mysql console:

CREATE DATABASE mydatabasename;
Related