| 28 | |
| 29 | == Trouble Shooting == |
| 30 | |
| 31 | You can login to the local MySQL instance via: `mysql --defaults-file=/root/.my.legacy.cnf`. |
| 32 | |
| 33 | You can manually re-load the MySQL users into the proxysql server by running (from the mosh, as root): `proxysql-load` |
| 34 | |
| 35 | You can test access to the database servers for a given user with: |
| 36 | |
| 37 | 1. Local MySQL access: `mysql -u <username> -p --port 3307` |
| 38 | 2. Network MySQL access: `mysql -u <username> -p --host pachamama.mayfirst.cx` (the .cx domain signals the use of our internal, private IP range) |
| 39 | |
| 40 | You can login to the ProxySQL instance with: |
| 41 | |
| 42 | `mysql` |
| 43 | |
| 44 | Use the `main` database and peruse the `mysql_users` table to see which users should be configured to use which backend MySQL servers. The `default_hostgroup` of 999 is the localhost. `default_hostgroup` 1 is lumumba and 2 is pachamama. |
| 45 | |
| 46 | == Post Transition == |
| 47 | |
| 48 | When the transition is complete: |
| 49 | |
| 50 | * Remove the `/root/.my.legacy.cnf` file. This file signals that we are in a transition period. |
| 51 | * Remove `transition => ture` from the puppet file. |
| 52 | * Add `mysql => 'n'` to the `m_mosh` definition in the puppet file to prevent puppet from trying to re-install MySQL |
| 53 | * Purge `mariadb-server` from the host |
| 54 | * Delete `/var/lib/mysql/` |