MX on Linux: Difference between revisions

m
Maria is an alternative that has largely similar command syntax so is likely to work with code (like MX) designed to work with MySQL. Since the MX developer (Mark Crossley) actually uses Maria DB we can have plenty of confidence it is suitable. To install this database server, we type <tt>sudo apt install mariadb-server php-mysql -y</tt>.
 
Our database files will be stored at '''/var/lib/mysql''' by default. Our MariaDB configuration is stored at '''/etc/mysql/mariadb.conf.d/50-server.cnf''', and it is the ''datadir='' entry that controls where the database files are stored.
 
===Transferring database tables to your Pi===
If you have been using Cumulus before (and have a database) then you can use PhpMyAdmin on your old device to '''export''' out all the Cumulus tables as SQL in a zip file, FTP that zip file across to your Pi, use PhpMyAdmin to '''import''' that zip file. Providing you selected the right options for what SQL you created in your export, the import will contain SQL to create the tables and to insert all the rows into each table. You might want to also export/import the PhpMyAdmin tables with your preferences in a separate zip, although these might need some extra transformations, as they are specific to a particular version of the database server (and the old device version may not match the MariaDB version on your Pi.
 
If you have been using Cumulus before (and have a database) then you can use PhpMyAdmin on your old device to '''export''' out all the '''Cumulus tables as SQL''' in a zip file, FTP that zip file across to your Pi, use PhpMyAdmin to '''import''' that zip file.
 
Providing you selected the right options for what SQL you created in your export, the import will contain SQL to create the tables and to insert all the rows into each Cumulus table on your Pi.
 
You might want to also export/import the '''PhpMyAdmin tables''' with your preferences in a separate zip, although these might need some extra transformations, as they are specific to a particular version of the database server (and the old device version may not match the MariaDB version on your Pi). Some PhpMyAdmin tables do change for different versions of the tool, so that too may may export/import of its tables more complicated.
 
== Making your database secure ==
5,838

edits