Is brew using MySQL or MariaDB
You can identify what you've installed with homebrew with the list option:
$ brew list

To identify which you have, if the above doesn't help you can check the mysql binary version:
$ mysql --version
mysql  Ver 15.1 Distrib 10.3.12-MariaDB, for osx10.14 (x86_64) using readline 5.1 

And after logging into the database, you can see what output you get:
$ mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.3.12-MariaDB Homebrew

And - you can check which it's using as follows:
SHOW VARIABLES LIKE &quot;%version%&quot;;

Then version and  version_comment. Should be something like:

| version                 | 10.1.29-MariaDB            |
| version_comment         | MariaDB Server             |

The database consists of both the server that's running, and the client.
You can force the client you want my using the full path - something like:
/usr/local/Cellar/mariadb/10.3.12/bin/mysql

You can check the server you're running with a ps:
$ ps -ef | grep mysqld
  501 95347     1   0 12:07PM ??         0:00.02 /bin/sh /usr/local/Cellar/mariadb/10.3.12/bin/mysqld_safe --datadir=/usr/local/var/mysql --pid-file=/usr/local/var/mysql/server.pid
  501 95411 95347   0 12:07PM ??         0:00.40 /usr/local/Cellar/mariadb/10.3.12/bin/mysqld --basedir=/usr/local/Cellar/mariadb/10.3.12 --datadir=/usr/local/var/mysql --plugin-dir=/usr/local/Cellar/mariadb/10.3.12/lib/plugin --log-error=/usr/local/var/mysql/server.err --pid-file=/usr/local/var/mysql/server.pid

Here you can see the start script is running (first line), and has called the actual server binary (second line). Both are running the mariadb instance.
The two packages will conflict with each other and shouldn't be installed at the same time. The conflict is called out in the brew recipe.