Asterisk and FreePBX on Debian12
Preparations
Create new user in Cloud SQL
https://console.cloud.google.com/sql/instances/xxx/users?project=yyy
dashes can not be used in the MariaDB databases' naming. To match user to database, only underlines are used.
Verify connection from the host
mysql -h 172.21.32.6 -u pbx_2dz_fi_asterisk -p
Create database for Asterisk
CREATE DATABASE pbx_2dz_fi_asterisk CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON pbx_2dz_fi_asterisk.* TO 'pbx_2dz_fi_asterisk'@'10.166.0.2';
FLUSH PRIVILEGES;