How to create additional databases in my domain? #1890
-
Dear friends of EasyEngine: I created a virtual host for my domain foo.bar in EE4 with a WP installation. Everything is correct, running well. Inside this domain, I created two PHP apps, each one installed in its own folder (foo.bar/app1 and foo.bar/app2). Now I need to create a DB for each of them. Is there an easy way to do this? How can I create an extra db not tied to WordPress installation? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I got the solution by myself. First of all, I must warning that my solution could be insecure for some scenarios, because I granted ALL PRIVILEGES to a DB user. Anyway you can use it as a path to find your own safer solution. This solution uses
Now the user Saúde! |
Beta Was this translation helpful? Give feedback.
I got the solution by myself.
First of all, I must warning that my solution could be insecure for some scenarios, because I granted ALL PRIVILEGES to a DB user. Anyway you can use it as a path to find your own safer solution.
This solution uses
global-db
. If you created a specific db for your site (using--local-db
parameter), you may changeglobal-db
to the name of your "local-db".cd /opt/easyengine/services && docker-compose exec global-db bash -c 'mysql -uroot -p${MYSQL_ROOT_PASSWORD}'
.CREATE USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
(I used the older, though still secure an…