To add a password you need to change this configuration below in the file .magento/services.yaml
.
From
mysql:
type: mysql:10.0
disk: 9192
To
mysql:
type: mysql:10.0
disk: 9192
configuration:
schemas:
- main
endpoints:
mysql:
default_schema: main
privileges:
main: admin
After that, you will need to adjust the user and password in your app/etc/env.php
, you will find the user and password running this command below inside your instance.
php -r 'print_r(json_decode(base64_decode($_ENV["MAGENTO_CLOUD_RELATIONSHIPS"])));'
Reference: https://devdocs.magento.com/cloud/project/services-mysql.html#connect-to-the-database