Hi guys,
I followed this guide (https://marketplace.digitalocean.com/apps/magento-2-open-source-1) to install Magento 2 one click.
The mysql password is stored in /root/.digitalocean_password after installation. But every time the droplet is restarted the password changes. So I have to change it in the applications, eg. /var/www/html/app/etc/env.php for magento database.

Does anyone know, how to prevent mysql password change?

Best regards, Vitali

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello, @vige1000

When the server is rebooted and you login again the Magento script is executed again and will change the password.

If you’ve finished the Magento installation and don’t want to have the install script running on your next login you can edit the .bashrc file and remove the last two lines from it:

chmod +x /opt/digitalocean/magento_setup.sh
/opt/digitalocean/magento_setup.sh

then execute:

source ~/.bashrc

The next time you access the droplet, the install script will not be executed. However if you reboot the droplet the install script will be executed again and the two lines will be added back in the .bashrc file

Thanks for reporting this. We will have a look and see if we can optimize
the process and prevent any possible issues.

Regards,
Alex

  • Hi Alex,
    thank you for information. I comment both lines. In my .bashrc I have had even 4 lines so two of each at the end of the line.

    “..We will have a look and see if we can optimize
    the process and prevent any possible issues…”

    Ok, I will wait for a solution.

    Thank you, Vitali

Submit an Answer