I have some problems with a database. I think it might be mysql, my own database is probably mariadb. How can I check that?

  • Are we talking about a raw database file or a running database? – George Udosen Nov 16 '17 at 6:08
  • You want to check weather mariadb is installed or not? – neferpitou Nov 16 '17 at 6:31
  • @neferpitou Yes. I'm not sure which of the two is installed in Lampp. I have a Akeeba backup that installs (thank god!) well on the live server, but acts weird when I install it on my localhost. – Jos Nov 16 '17 at 7:15
  • dpkg -l | grep mysql and for mariadb dpkg -l grep mariadb; if it shows nothing then it is not installed. – neferpitou Nov 16 '17 at 8:16

You can do this on your login to the database from the terminal:

mysql -u user -p

Enter your password and it displays the database name with the welcome message.mysql welcome pageMaria Welcome page


Since you mentioned Lampp, this means you have Linux, Apache, MySQL, PHP and phpmyadmin. Use this command to see what is installed on your machine, Mysql or mariadb.

dpkg -l | grep -e mysql-server -e mariadb-server
  • dpkg command not found.... – Richard Fu Apr 30 '19 at 5:26
  • 2
    @RichardFu Which distro you are using? You might need to use this one instead: rpm -qa | grep -e mysql -e mariadb – sys0dm1n May 7 '19 at 8:10

If you can perform a query :


I tested on a mariadb server and it shows :

  • 1
    For me: the result is "8.0.23-0ubuntu0.20.04.1" – The Anh Nguyen Mar 16 at 7:33

If you can perform a query then i would suggest:


then look for version_comment you should see something like MariaDB Server OR MySQL Community Server (GPL)

  • 1
    For me: "version_comment" is "(Ubuntu)" ? – The Anh Nguyen Mar 16 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.