Home User Manual Discussion Forum Search

Linux Server

See Linux and Mac.

Linux servers are the responsibility of the practice or IT to install. Open Dental Support cannot assist with Linux server installations or Linux server troubleshooting.

MariaDB

  1. Install MariaDB from RPM or install package that best matches system from https://mariadb.org/download/.

  2. Setup grant tables on Linux by running the following commands. It is recommended that a password is set for the root user which can be entered between the single quotes that follow 'IDENTIFIED BY'. This is documented at: https://mariadb.com/kb/en/grant/.

    GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '';
    GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY '';


  3. Edit the MariaDB configuration file named server.cnf to disable the use of InnoDB tables by default. The server.cnf file is usually located at the path /etc/my.cnf.d/server.cnf. Add the following text under the [mysqld] section:

    default-storage-engine=MyISAM
    max_allowed_packet=40M
    max_connections=3000
    port=3306
    sql_mode=''
    explicit_defaults_for_timestamp=1


  4. Copy a blank or current OpenDental database to the Linux server.
    • Each Linux installation might have a different MariaDB data location or path. The database path is documented in either my.cnf or server.cnf and is defined on a line starting with datadir=. The default path can vary and is currently /var/lib/mysql
    • Copy the database files to a folder that is created in the data directory. For example, if the path is /var/lib/mysql and opendental is the name of the new database, copy to /var/lib/mysql/opendental/.
    • Ensure the newly created database folder has permissions for MariaDB to access the files. Either set the owner to the mysql user or set the folder permissions to allow access to all users. Open a terminal window and type one of the two commands (change the directory path to match the actual database path): chown -R mysql:mysql /var/lib/mysql/opendental or chmod -R 777 /var/lib/mysql/opendental.

Set Up File Share (OpenDentImages)

This is just like setting up any other fileshare on a Linux machine. This can be set up as desired, but all users need full permissions (read, write and delete).

A good option is to set up Samba, then set up the share. Here are some web sites with directions:

Steps we followed:

  1. Install Webmin (www.webmin.com). Logon as root or other user with adequate permissions. Click the Servers tab, choose Samba windows filesharing.
  2. Create fileshare, then edit securities to set <writeable> and <guest access> to yes.
  3. Open an SSH terminal to the Linux machine. Log on as root or other user with adequate permissions.
  4. Navigate to immediate parent directory of shared directory.
  5. Type chmod -R 777 foldername.
  6. This process is done. ls - l will show the permissions for all of the child folders including the share.

Once the share is set up, copy the contents of OpenDentImages to this new share, then set Data Paths to this location.

Convert an Existing Linux Open Dental MySQL/MariaDB database to use MyISAM tables instead of InnoDB Tables

In Database Maintenance run the InnoDB tool.

Another option is below. Only consider this option if the office in question has been using the Linux server already.

  1. If needed, check to see if any of the current database tables are not in MyISAM format. Run the following query and replace the database name of opendental with the actual database name:

    SELECT TABLE_NAME,ENGINE
    FROM INFORMATION_SCHEMA.TABLES
    WHERE TABLE_SCHEMA = 'opendental'
    AND ENGINE NOT LIKE 'MyISAM';


    If the query does not return any results, steps 2 - 6 do not need to be completed.

  2. Stop the MySQL/MariaDB service.

  3. Backup the database.

  4. Restart the MySQL/MariaDB service.

  5. Generate the alter table script using the following script (make name adjustments as needed). Make sure that the output folder exists and that the mysql user has full permissions on that folder. Also make sure that the output script file (see below) DOES NOT exist before running the command or else the command will fail. For example, if running the command a second time, the script previously generated must be deleted.

    SET @dbname='opendental';
    SET @outengine='MYISAM';
    SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE = ',@outengine,';')
    FROM INFORMATION_SCHEMA.TABLES
    WHERE TABLE_SCHEMA = @dbname
    INTO OUTFILE '/tmp/mysql/myisam_convert_script.txt';


  6. Run the output script myisam_convert_script.txt in MySQL/MariaDB as follows. From a terminal window type (make changes for actual temporary script file path as needed):

    mysql -u root -p opendental < /tmp/mysql/myisam_convert_script.txt


  7. Edit the server.cnf file and make sure that the skip-innodb and default-storage-engine=MyISAM options are in the file on their own lines and that the lines are uncommented. Save any changes to the server.cnf file and if the file was modified then restart the MySQL/MariaDB service. This step prevents new tables from being generated as innodb tables in the future.

Troubleshooting

During an update, receive this error: The database tables are in MyISAM format, but the default database engine format is InnoDB. You must change the default storage engine within the my.ini (or my.cnf) file on the database server must be changed and restart MySQL in order to fix this problem. Exiting.

To server.cnf, add default-storage-engine=MyISAM (Step 3 above under MariaDB)

Case Sensitivity: Linux MySQL/MariaDB is case sensitive by default. Open Dental tries to use only lowercase table names, however may have some mixed case variables. If ther are issues with case sensitivity, users may want to turn case sensitivity off. Simply add this line to the server.cnf file on the Linux server: lower_case_table_names=1.

Example of errors due to case sensitivity:

  • MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'opendental_bsm_lou_sh.ehrTrigger' doesn't exist.

    (Notice the table name ehrTrigger is mixed case).

  • Unhandled exception trying to access the EHR Dashboard.
Open Dental Software 1-503-363-5432