TL;DR: both schema and database mean database in MySQL.
MySQL (<— you’re here in SQL client, unless you set default schema in connection)
database1 (<— you're here if use database1;)
tables
PostgreSQL
database1
public (<— you’re here in SQL client, unless you set default search_path in connection)
tables
schema1 (<— you're here if set search_path=schema1;)
tables