Mysql: Difference between revisions
imported>Onny No edit summary |
m →Tips: i included a link for the mycli github page |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
MySQL | [https://www.mysql.com MySQL] and [https://mariadb.org MariaDB] are installed via the same services.mysql configuration. | ||
* MySQL is a widely used open source relational database management system (RDBMS) that offers various features, tools, and services for data warehousing, analytics, machine learning, and more. | |||
* MariaDB is a popular and stable fork of MySQL that is compatible with MySQL and has additional enhancements and features. | |||
Setup and enable Mysql ( | = Setup MySQL = | ||
Setup and enable Mysql database daemon (in this example: latest stable version in nixpkgs) | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
services.mysql = { | services.mysql = { | ||
enable = true; | enable = true; | ||
package = pkgs. | package = pkgs.mysql; | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= Setup MariaDB = | |||
Setup and enable MariaDB database daemon (in this example: version 11.0) | |||
<syntaxhighlight lang="nix">services.mysql = { | |||
enable = true; | |||
package = pkgs.mariadb_110; | |||
};</syntaxhighlight> | |||
= Tips = | |||
install [https://github.com/dbcli/mycli mycli] to get autocompletion when working with mysql/mariadb | |||
<syntaxhighlight lang="nix">environment.systemPackages = [ pkgs.mycli ];</syntaxhighlight> | |||
= Maintenance = | = Maintenance = | ||