This is an old revision of the document!
The only supported database for FreeHealth EHR is MariaDB.
In the following guide, all references to “MySQL” shoud be considered to mean “MariaDB”.
The easiest way to try FreeHealth with MariaDB is to install MariaDB on your own laptop or PC: FreeHealth EHR and MariaDB will run on the same machine. This installation guide will cover this basic installation.
For real world professional usage with multiple users and workstations, you should run MariaDB on its own GNU/Linux server. Setting up a network for your healthcare facility is beyond the scope of this installation guide. You can contact one of our recommended partners to help you with this task.
sudo apt-get install mariadb-server mariadb-client sudo mysql -u root GRANT ALL PRIVILEGES ON *.* TO 'freehealth'@'127.0.0.1' IDENTIFIED BY 'MyPassword' WITH GRANT OPTION;
You will use MariaDB user 'freehealth' and its password 'MyPassWord' to install the EHR.
Test by entering this in a terminal:
# note: we are NOT using sudo, this must work with a normal (non root) user, without using sudo mysql -u freehealth -h 127.0.0.1 -pMyPassWord
It should allow you to connect to MariaDB server:
Welcome to the MariaDB monitor. Commands end with ; or \g. ...
If you encounter problems, try to delete mariadb-server or mysql-server completely (use a search engine to learn how to do it, removing the package is not enough even with purge option), reboot and try again. If you still can't get user 'freehealth' to connect to MariaDB server with a password (without sudo or a root user), you should consider getting professional help to install the database.
MariaDB server setup is done.
Most connection errors are not related to a bug in the EHR. An error message is displayed in a textbox to help you fix the problem. If you are using version 0.11 or higher, detailed information is available in a log file created inside your home or user folder for each connection error. The filename start with EHR_log_ followed by a date and time stamp. The file type is .txt A typical log file will be named
Please check if you can connect to your database with the mysql client before asking for help on the forum. The user should be freehealth or equivalent to root and be able to read the mysql database:
SELECT User FROM mysql.user;
Remnants of previous MySQL installation are known to cause problems.
If you encounter problems, try to delete any previous installation of mysql-server completely (use a search engine to learn how to do it, removing the package is not enough even with purge option, you need to delete a collection of system files), reboot and try again.