MariaDB
MariaDB is one of the most popular community-developed relational database management systems published under the GNU GPL. MariaDB born as a MySQL fork from former developers after Oracle acquisition.
Readings
editMultimedia
editActivities
edit- Perform the following tasks:[1]
Install and start MariaDB in MacOS
editbrew install mariadb
- Start MariaDB:
/usr/local/bin/mysql.server start
(command is mysql but you are actually starting MariaDB)
Starting MariaDB .180619 10:15:19 mysqld_safe Logging to '/usr/local/var/mysql/file.err'. 180619 10:15:19 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql SUCCESS!
- Check MariaDB is running:
/usr/local/bin/mysql.server status
SUCCESS! MariaDB running (80662)
Create a table: CREATE TABLE
edit- Connect to database test, will be created in default MariaDB installation:
mysql test
create table my_first_table (my_first_column char, my_second_column char);
- Show tables so we can check our new created table is available:
MariaDB [test]> describe my_first_table; +------------------+ | Tables_in_test | +------------------+ | my_first_table | +------------------+
- Show details about your new table:
MariaDB [test]> describe my_first_table; +------------------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------+---------+------+-----+---------+-------+ | my_first_column | char(1) | YES | | NULL | | | my_second_column | char(1) | YES | | NULL | | +------------------+---------+------+-----+---------+-------+ 2 rows in set (0.003 sec)
- Show privileges:
MariaDB [(none)]> show grants;
- Allow remote root access:
GRANT ALL PRIVILEGES on *.* to 'root'@'%' IDENTIFIED BY 'YOUR_PASSWORD';
Advanced Features
edit- Understand MariaDB w:partitioning (w:https://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems#Partitioning) and uses cases[4].
SHOW PLUGINS
to see if your version support it. - Create a MariaDB Cluster using MariaDB Galera Cluster. [5]