MySQL password

Issues during installation and related to database
Post Reply
nillenille2
Posts: 18
Joined: Thu Oct 06, 2016 2:26 pm

MySQL password

Post by nillenille2 » Mon Aug 14, 2017 5:16 pm

Hi!
I've recently changed my MySQL password. I've tried to change it in Onlyoffice as well – I've edited web.connections.config (and others), but for some reason the change gets rolled back. What am I doing wrong?
I'm running the Community Server on Debian (Installer).
Thanks!
nille

Maxim
Posts: 1844
Joined: Tue Oct 11, 2016 2:34 pm

Re: MySQL password

Post by Maxim » Tue Aug 15, 2017 6:25 am

Hello nillenille2!
Please reproduce (describe step-by-step with commands you used) your scenario to change MySQL password to check it out.

nillenille2
Posts: 18
Joined: Thu Oct 06, 2016 2:26 pm

Re: MySQL password

Post by nillenille2 » Tue Aug 15, 2017 11:04 am

Hi, I think I used something like

Code: Select all

UPDATE mysql.user SET authentication_string = PASSWORD('123') WHERE User = 'root' AND Host = 'localhost'; flush privileges;
. Then stopped all services related to Onlyoffice and changed this line in the .config files:

Code: Select all

<add name="default" connectionString="Server=localhost;Database=onlyoffice;User ID=root;Password=123;Pooling=true;Character Set=utf8;AutoEnlist=false" providerName="MySql.Data.MySqlClient"/>
.
Is there another way to change the password?

Maxim
Posts: 1844
Joined: Tue Oct 11, 2016 2:34 pm

Re: MySQL password

Post by Maxim » Wed Aug 16, 2017 7:39 am

Hello nillenille2!
Try this command to change the root's password

Code: Select all

docker exec -it ${MYSQL_CONTAINER_NAME} mysqladmin password "$MYSQL_ROOT_PASSWORD"
and this one to create user with password

Code: Select all

CREATE USER '$MYSQL_MAIL_USER'@'localhost' IDENTIFIED BY '$MYSQL_MAIL_ROOT_PASSWORD';

nillenille2
Posts: 18
Joined: Thu Oct 06, 2016 2:26 pm

Re: MySQL password

Post by nillenille2 » Wed Aug 16, 2017 10:11 am

Hi Maxim,
I don't use Docker. ;)
And I can log into MySQL with my new password.

Maxim
Posts: 1844
Joined: Tue Oct 11, 2016 2:34 pm

Re: MySQL password

Post by Maxim » Thu Aug 17, 2017 8:22 am

Hello nillenille2!
I would advise you to make a mysql dump, make backup of /var/www/onlyoffice/Data and reinstall with correct pass.

Post Reply