Difference between revisions of "MariaDB"

From Coders.Bay Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{short description|Database management system, relational, open source, community developed fork of MySQL}}
{{multi language banner|[[MariaDB|English]] ; [[MariaDB-fr|Français]]}}
{{Infobox software
 
| name = MariaDB
== Introduction ==
| title = MariaDB
Databases are used to manage large amounts of similar structured data, like information about clients (first name, family name, 1st line of address, 2nd line of address, zip code, city etc.), clothes (type, brand, price, size, description, number in stock etc.), purchases etc.. Databases mainly consist of tables, relationships between tables and "queries", i.e. ways to extract from the data exactly the information you need for a particular purpose, for instance "all trousers priced more than 50 € bought by clients living in Paris in 2014, with just their price and size".
| logo = MariaDB colour logo.svg
| screenshot = MariaDB monitor screenshot.png
| caption =
| collapsible =
| author =
| developer = MariaDB Corporation Ab, MariaDB Foundation
| released = {{Start date and age|2009|10|29|df=yes}}<ref>{{Cite web |url=https://mariadb.com/kb/en/library/mariadb-5138-release-notes/ |title=MariaDB 5.1.38 Release Notes |website=MariaDB KnowledgeBase |access-date=2019-01-14}}</ref>
| latest release version = <!-- If you update [[Template:MariaDB version]], it will automatically update this page and [[List of content management systems]]--> {{MariaDB version}}
| latest release date = {{MariaDB version|releasedate}}
| discontinued =  
| programming language = [[C (programming language)|C]], [[C++]], [[Perl]], [[Bash (Unix shell)|Bash]]
| operating system = [[Linux]], [[Windows]], [[macOS]]<ref>{{cite web|title="Download MariaDB"|url=https://mariadb.com/downloads/|access-date=2019-01-16}}</ref>
| platform =
| size =
| language = English
| genre = [[Relational database management system|RDBMS]]
| license = [[GNU General Public License|GPLv2]], [[GNU Lesser General Public License|LGPLv2.1]] (client libraries)<ref name="MariaDB licenses">{{Cite web|url=https://mariadb.com/kb/en/library/mariadb-license/|title=MariaDB License|website=MariaDB KnowledgeBase}}</ref>
| website = {{URL|https://mariadb.com/}} (MariaDB Corporation Ab, formerly SkySQL Corporation Ab)<br />{{URL|https://mariadb.org/}} (MariaDB Foundation)
}}


MariaDB is a database management system using a language called SQL and included in Mageia. It is a fork of MySQL, so it often uses file and folder names including "my" or "mysql" in them. In Mageia, the configuration file is /etc/my.cnf and the databases are stored in /var/lib/mysql. Databases are not human-readable files and MariaDB doesn't include a GUI (graphic user interface). A good way to read and manage MariaDB data is PhpMyAdmin. Many applications use MariaDB to manage their data, without the final user having to know it at all.
MariaDB is a database management system using a language called SQL and included in Mageia. It is a fork of MySQL, so it often uses file and folder names including "my" or "mysql" in them. In Mageia, the configuration file is /etc/my.cnf and the databases are stored in /var/lib/mysql. Databases are not human-readable files and MariaDB doesn't include a GUI (graphic user interface). A good way to read and manage MariaDB data is PhpMyAdmin. Many applications use MariaDB to manage their data, without the final user having to know it at all.
Line 17: Line 35:
* Issue {{cmd|mysql_secure_installation}} to set/edit MariaDB administrative "root" password and perform a few security measures - just reply to the questions.
* Issue {{cmd|mysql_secure_installation}} to set/edit MariaDB administrative "root" password and perform a few security measures - just reply to the questions.
* Then log in using that password: {{cmd|mysql -uroot -p}}, and there you can create a first database.
* Then log in using that password: {{cmd|mysql -uroot -p}}, and there you can create a first database.
== Usage ==
MariaDB uses SQL language. You can find the list of inline commands on [https://mariadb.com/kb/en/sql-commands MariaDB.com].
There is a lesson about SQL on [http://www.w3schools.com/sql/default.asp W3 schools], and one in French in [http://fr.wikiversity.org/wiki/Structured_Query_Language Wikiversity], as well as lessons in French about the usage of MySQL (quite similar to MariaDB) on [http://fr.openclassrooms.com/informatique/mysql/cours OpenClassrooms].
== Troubleshooting ==
The log file, i.e. the file of errors, is /var/log/mysqld/mysqld.log .
[[Category:Documentation]]

Revision as of 08:43, 8 April 2022

Template:Short description Template:Infobox software

MariaDB is a database management system using a language called SQL and included in Mageia. It is a fork of MySQL, so it often uses file and folder names including "my" or "mysql" in them. In Mageia, the configuration file is /etc/my.cnf and the databases are stored in /var/lib/mysql. Databases are not human-readable files and MariaDB doesn't include a GUI (graphic user interface). A good way to read and manage MariaDB data is PhpMyAdmin. Many applications use MariaDB to manage their data, without the final user having to know it at all.

Installation

In most cases, you will need a LAMP (Linux, Apache, MariaDB, PHP) pile, plus PhpMyAdmin. To install them, go to Mageia control center (an icon in the tool bar usually at the bottom of your screen) then choose "Software management" → "Install & remove software". In the upper left part of the window, there are 2 rolling lists: in both of them, choose "All". In the "Find" field, type "lamp", press the "Enter" key and choose in the list "task-lamp-php". You will probably be asked to install required packages: click on "OK". Then in the "Find" field, type "phpmyadmin", press "Enter", check phpmyadmin's box, click "OK" if asked for dependencies. Then click on "Apply" at the right bottom of the window and read carefully the upgrade information message for MariaDB. The installation of MariaDB also set a user and a user group both called "mysql" and who will own the files.

The same way, you can install just MariaDB and PhpMyAdmin, looking for "mariadb" in Mageia Software management, and choosing in the list the version of "mariadb" corresponding to your system: x86_64 for a 64 bits system, i586 for a 32 bits system.

Configure the database

All commands below need be entered as root.

  • Start MariaDB (i.e it was just installed) Template:Cmd It seems installing the rpm also sets MariaDB to start at boot (should it not, issue 'systemctl enable mysqld' )
  • Issue Template:Cmd to set/edit MariaDB administrative "root" password and perform a few security measures - just reply to the questions.
  • Then log in using that password: Template:Cmd, and there you can create a first database.