ONLYOFFICE 7.0: online forms, password protection in sheets, collaboration improvements and much more
ONLYOFFICE 7.0 released

Unable to find MYSQL password

Do you want to: Ask a how-to question

Type of installation of Workspace (docker, deb/rpm, exe): deb/rpm
OS: Ubuntu server 20.04

I am trying to install onlyoffice workspace on ubuntu I have tried using the integrated docker options but no matter what I keep getting 502 errors. with the deb package installation everything is working however, when I install onlyoffice mail separately I can not connect it to the existing mysql installation because I can not find the root password that the onlyoffice script used to set up mysql. my question is where do I find this root password? Is there a way to set up the password during installation the script parameter does not seem to work?

Hello @charlie88

have tried using the integrated docker options but no matter what I keep getting 502 errors.

Please point me to the guide which you used for docker installation. If you have saved logs from this installation, please provide them.

my question is where do I find this root password? Is there a way to set up the password during installation the script parameter does not seem to work?

Do you mean Mail server database password? Please try ‘ Isadmin123’, we have information about it here: Installing ONLYOFFICE Mail for Docker on a local server - online office

If I misunderstood your request please provide us with details.

Sorry, I was not very clear, I am using the script for installation workspace-install.sh. I do not have the logs anymore since I have reinstalled Ubuntu a few times now. Maybe I will try the docker install again later and post the logs.
When installing the rpm/deb version, MySQL gets installed but it sets the root password to something that I can not find. When I install the only office mail server onto docker, it installs a MySQL docker container and I have no issue accessing the root of that installation with the same password you mentioned.
I can not get into the non docker version of MySQL and would like to setup the mail server that it uses the same MySQL server not a docker container since the ports conflict and both can not be running at the same time.

Oh, now I got it.

If you want to reconfigure Mail server to the database, which is installed along with the portal (packages), please take a look at this config file:

/var/www/onlyoffice/WebStudio/web.connections.config

Please note that we didn’t test such installation. Usually we recommend using separate server for Mail server or deploying it via docker as a part of docker installation of the portal. Your scenario is theoretically possible, but we have not tested it.

Ahh, thank you very much. After adding these parameters to the script, mail server installs in docker and it correctly adds the mail admin user and the mail server database to the MySQL server however when I attempt to connect it to my portal I get an error that the table ‘onlyoffice_mailserver.api_keys’ does not exist. For script parameters I specified MySQL host, port, root user, and root password is there anything else I need to add?

Hello,
Please go to the host and run docker ps. Make sure that Mail server container is running. If so, please try to restart it. Also connect to MySQL DB > does it contain onlyoffice_mailserver DB?

the mail server is running but when I connect to the MySQL DB > it does not contain the onlyoffice_mailserver or the admin user

Hello,

Did you try to restart the container? If not, please do it.

Also please go to the host and run docker logs onlyoffice-mail-server. Please provide us with output result.

Yes I have tried to restart the container.
Here is the output from the log:
[ INFO ] Checking configuration file: /usr/src/iRedMail/config … [FOUND]

[ INFO ] Import installation process status from file: /usr/src/iRedMail/runtime/install.status.

Waiting for external MySql response

[ INFO ] Checking configuration file: /usr/src/iRedMail/config … [FOUND]

[ INFO ] Import installation process status from file: /usr/src/iRedMail/runtime/install.status.

Waiting for external MySql response

Please provide us with the complete Mail server installation scenario. If you have edited the installation script, please provide it to us. We need exact scenario of your installation.

I have not edited the script, I am trying to install it onto docker using and external MySQL server that is on the host machine. I have found the docker gateway IP address 172.17.0.1, and granted privileges to the root user to have access from any domain. I used the following command to install the mail server

sudo bash workspace-install.sh -ics false -ids false -icp false -ims true -md mx.domain.ca -es true -mysqlh 172.17.0.1 -mysqlprt 3306 -mysqlru root -mysqlrp PASSWORD

it is not connecting to the MySQL server, I am not sure what else I need to do for this to work.

Could you please try to set database address from web.connections.config file in the installation command? I mean this: -mysqlh xx.xx.xx.x

All that is there is the loopback ip 127.0.0.1 which I have tried but it gives the same issue. I read online somewhere that you could used the docker gateway as well, but neither works unfortunately.

As mentioned earlier, we have not tested this scenario. I think the correct solution would be to use docker installation for entire portal or install Mail server on the separate server instead of trying to set up this scenario. Earlier you faced some issues with docker installation. Is it possible to reproduce the situation (portal installation via docker) and provide us with detail?

I think we figured out the situation with Mail server and package MySQL.

Please check my steps:

  1. Go to MySQL :

CREATE USER ‘mail_admin’@’%’ IDENTIFIED WITH mysql_native_password BY ‘Isadmin123’;

GRANT ALL PRIVILEGES ON . TO ‘mail_admin’@’%’;

FLUSH PRIVILEGES;

  1. Now install Mail server via script (docker): bash workspace-install.sh -ics false -ids false -icp false -ims true -md yourdomain.com -mysqlh localhost -skipdc true -mysqlmd onlyoffice_mailserver -mysqlmu mail_admin -mysqlmp Isadmin123

You can check MySQL address in web.connections.config file.

  1. Now go to the portal > settings > Mail server. Set IP address of the container and click Connect button.

I followed your instructions and unfortunately it still did not connect to the MySQL network. I just put a fresh install of ubuntu and did the full docker install as you suggested and I am not getting a 502 gateway error this time, I tried it multiple times before and it wasnt working. It all appears to be working now though! I really appreciate all your assistance in troubleshooting my issues

1 Like