Your Own Server: Difference between revisions

m
 
(3 intermediate revisions by the same user not shown)
 
 
=== Install MariaMariaDB database ===
 
MySQL database software is controlled by Oracle and not made available for inclusion in Raspberry Pi repository.
 
MariaSQLMariaDB 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 DBMariaDB, we can have plenty of confidence it is suitable.
 
To install this database server, we type <code>sudo apt install mariadb-server php-mysql -y</code>.
===Getting web and database servers ready for use===
 
We need to create a user for PhpMyAdmin (or adMiner or whatever) to access our database and another for Cumulus to use to access the database tables. At the moment our database access has the single '''root@localhost''' user we created when we installed MariaDB. The initial password was set then, and we need to use it to get access to MariDBMariaDB monitor where we can insert some SQL commands to create these two users.
 
Most tools, like PhpMyAdmin, on first start up will ask for username (here I choose "admin") and password, thereafter the tool should use same log-in (by default you see log-in screen each time you restart or if it is left idle for a long time), let us create a user called 'admin' for it.
 
As I type this, Cumulus MX has no exception handling if the username and password defined in the settings do not exist in the database, therefore in this situation it will crash out (with message press Enter to close).
 
 
=== Installing Adminer, or PhpMyAdmin ===
=== Restarting Web Server ===
 
After all these installs, we need to restart your web server (so it loads the PHP and MariaDB), if you have installed apache 2 do this by typing <code>sudo service apache2systemctl restart apache2</code> or (if we just want the Apache configuration reloaded) by typing <code>sudo systemctl reload apache2</code>. Similar commands apply for other web servers.
 
We will need to restart Apache (or whichever web server we installed) any time we change our php.ini files, database passwords, and anything else that is checked when the web server starts.