I have some problems with a database. I think it might be mysql, my own database is probably mariadb. How can I check that?
Asked
Active
Viewed 4.2k times
21
-
Are we talking about a raw database file or a running database? – George Udosen Nov 16 '17 at 06:08
-
You want to check weather mariadb is installed or not? – neferpitou Nov 16 '17 at 06: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 07: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 08:16
4 Answers
19
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
Ibijola Adetayo
- 306
- 1
- 5
7
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
-
-
2@RichardFu Which distro you are using? You might need to use this one instead: `rpm -qa | grep -e mysql -e mariadb` – sys0dm1n May 07 '19 at 08:10
5
If you can perform a query :
SELECT VERSION();
I tested on a mariadb server and it shows :
5.5.60-MariaDB
Clemorphy
- 151
- 1
- 3
-
2
-
Yes, on MySQL only the version number (8.0.23 here) is in there, and the database type is not shown. So this isn't a great answer. – rfay Jan 03 '22 at 15:00
4
If you can perform a query then i would suggest:
SHOW VARIABLES LIKE "%version%";
then look for version_comment
you should see something like
MariaDB Server OR MySQL Community Server (GPL)
Adam
- 41
- 1
-
1
-
-
Yes, It is Showing ```version_comment``` as `MariaDB Server` in SQL Query – Chandan Sharma Mar 21 '23 at 07:18