MariaDB

From wikieduonline
Jump to navigation Jump to search

Installation[edit]

Configuration files[edit]

Binaries[edit]

Logs[edit]

Activities[edit]

Install and start MariaDB in MacOS[edit]

  • brew 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)


Docker installation[edit]

Create a table: CREATE TABLE[edit]

mysql test
  • Create a basic table with two columns using the create table [2][3] SQL statement:
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)
  1. Show privileges: MariaDB [(none)]> show grants;
  2. Allow remote root access: GRANT ALL PRIVILEGES on *.* to 'root'@'%' IDENTIFIED BY 'YOUR_PASSWORD';

Commands[edit]

Advanced Features[edit]

Related terms[edit]

Activities[edit]

  1. Understand how to limit the number of threads to save memory for the database memory buffers: https://mariadb.com/kb/en/library/thread-pool-in-mariadb/
SHOW VARIABLES LIKE 'thread_handling';
MariaDB [(none)]> SHOW VARIABLES LIKE 'thread_handling';
+-----------------+---------------------------+
| Variable_name   | Value                     |
+-----------------+---------------------------+
| thread_handling | one-thread-per-connection |
+-----------------+---------------------------+
1 row in set (0.00 sec)

thread_handling = [ pool-of-threads | one-thread-per-connection ]

  1. Read MariaDB Changelog/releases
  2. Read MariaDB encryption capabilites https://mariadb.com/kb/en/data-at-rest-encryption-overview/

See also[edit]

Advertising: