EasyEngine / EasyEngine/easyengine

How do I change mysql root password?

Open
#1,580 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
2.2k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

How to change root mysql password? Easy and clear question, right?

What I tried:

Change root pass in db using:
1. `cd /opt/easyengine/services && docker-compose exec global-db bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD}' `
2. `SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newrootpass');`
3. `flush privileges;`
4. `quit;`
5. `nano /opt/easyengine/services/docker-compose.yml` and change line `MYSQL_ROOT_PASSWORD`
6. manual edit record `global-db` password in `/opt/easyengine/db/ee.sqlite`
7. `ee service restart db`

**SO HOW TO CHANGE ROOT MYSQL PASSWORD?**

```
System Information

+-------------------+----------------------------------------------------------+
| OS | Linux 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:3 |
| | 7 UTC 2021 x86_64 |
| Shell | /bin/bash |
| PHP binary | /usr/bin/php8.0 |
| PHP version | 8.0.10 |
| php.ini used | /etc/php/8.0/cli/php.ini |
| EE root dir | phar://ee.phar |
| EE vendor dir | phar://ee.phar/vendor |
| EE phar path | /var/lib/docker/volumes |
| EE packages dir | |
| EE global config | /opt/easyengine/config/config.yml |
| EE project config | |
| EE version | 4.3.1 |
+-------------------+----------------------------------------------------------+

Server version: 10.5.4-MariaDB-1:10.5.4+maria~focal-log - mariadb.org binary distribution
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.