# Environment Configuration Instructions ## Database Password Setup The Magento database configuration has been added to your `.env` file, but you need to set the MySQL password. ### Step 1: Edit .env File Open your `.env` file and update these lines with your actual MySQL root password: ```env MAGENTO1_DB_PASSWORD=your_actual_mysql_password MAGENTO2_DB_PASSWORD=your_actual_mysql_password ``` ### Step 2: Clear Config Cache After updating the password, clear Laravel's config cache: ```bash ddev exec "php artisan config:clear" ``` Or if you're not using DDEV: ```bash php artisan config:clear ``` ### Step 3: Test the Connection 1. Visit the migration page: `https://migrate.ddev.site/migration` 2. Click the "Test Connections" button 3. You should see green checkmarks if the connections are working ## Troubleshooting ### If you don't know your MySQL password: 1. **Try connecting from the host:** ```bash mysql -u root -p ``` (Press Enter when prompted for password if there's no password) 2. **Or check if MySQL has no password:** - Leave `MAGENTO1_DB_PASSWORD=` empty (no value after the `=`) - Leave `MAGENTO2_DB_PASSWORD=` empty ### If connection still fails: 1. **Verify MySQL is accessible from DDEV:** ```bash ddev exec "mysql -h 172.22.0.1 -u root -pyour_password -e 'SHOW DATABASES LIKE \"magento%\"'" ``` 2. **Check MySQL bind address:** ```bash sudo grep bind-address /etc/mysql/mariadb.conf.d/50-server.cnf ``` Should be `bind-address = 0.0.0.0` (not `127.0.0.1`) 3. **Check if databases exist:** ```bash mysql -u root -p -e "SHOW DATABASES LIKE 'magento%';" ``` ## Current Configuration Your current `.env` settings: - **Host:** 172.22.0.1 (DDEV gateway IP) - **Port:** 3306 - **Database:** magento1 and magento2 - **Username:** root - **Password:** (needs to be set)