Difference between revisions of "MariaDB"

From Coders.Bay Wiki
Jump to navigation Jump to search
Line 35: 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.
==External links==
{{Wikibooks|MariaDB}}
* [https://mariadb.org/ MariaDB Foundation website]
* [https://mariadb.com/ MariaDB Corporation website]

Revision as of 08:45, 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.

External links

Template:Wikibooks