MX on Linux: Difference between revisions

m
== Install Maria database ==
 
Since MySQL database is controlled by Oracle, it is not available for Raspberry Pi repository.
Since MySQL database is controlled by Oracle, 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 it we type <tt>sudo apt install mariadb-server php-mysql -y</tt>.
 
Since MySQL database is controlled by Oracle, 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 itthis 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. 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 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.
 
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.
 
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. 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.
 
== Restarting Apache ==
5,838

edits