Can we integrate MySQL database instead of PostgreSQL for PHP example in Enterprise or Developer Edition?

Can we integrate MySQL database instead of PostgreSQL for PHP example in Enterprise or Developer Edition?

Hello @sid_007
Please clarify your request. Do I understand it right that you want to use MySQL instead pf PostgreSQL in Document server installation? If so, it’s possible. Please check out this title: Installing ONLYOFFICE Docs for Docker on a local server - ONLYOFFICE
DB_TYPE: The database type. Supported values are postgres, mariadb or mysql. Defaults to postgres.
If I misunderstood your request, please clarify it.

As for PHP example, please note that this is just the example. We do not recommend to use it in production. It needs for tests purposes only.

By the way, I noticed that you have commercial license. This way it’s better to contact us via Zendesk to get prompt replies.

I am going to install Workspace Enterprise Edition for Linux operating systems(ubuntu): Installing server version from RPM/DEB packages using the provided script - ONLYOFFICE

in which step I can change DB_TYPE: postgres to mysql

I need to set it in OS system environment variables?

like for Ubuntu we set using this command sudo -H gedit /etc/environment

can we change DB_TYPE after installation?

In general, I recommend to use docker installation to replace database on installation step via environment variables (according to provided earlier link). But in your case, package installation, probably you can try to set external MySQL database in default.json config file of Document server:

  1. Open default.json and find the following section:

         "sql": {
             "type": "postgres",
             "tableChanges": "doc_changes",
             "tableResult": "task_result",
             "dbHost": "localhost",
             "dbPort": 5432,
             "dbName": "onlyoffice",
             "dbUser": "onlyoffice",
             "dbPass": "onlyoffice",
             "charset": "utf8",
             "connectionlimit": 10,
             "max_allowed_packet": 1048575,
             "pgPoolExtraOptions": {}
         },
    
  2. Specify mysql as the type and indicate other required parameters as host, port, user and password.

  3. Then restart all Document Server services with supervisorctl restart all

Please note that I would recommend to use docker installation if you prefer to switch Document server database (PostgreSQL) to MySQL. I believe that docker is the easiest way.