I have been trying to set up phpmyadmin in my instance running on a Google Compute Engine. I have configured the root'@'localhost inside Access control options inside Google Cloud SQL and also allowed the IP address of the compute Engine to Authorized Networks under Google Cloud SQL.
But installing PhpMyAdmin on by Linux powered Compute Engine throws an Error on configuring db-config.php file.
After ignoring this I configured the config.inc.php file to including the Cloud SQL IPv4 address using sudo nano /etc/phpmyadmin/config.inc.php
such that it opens on http://hostname/phpmyadmin
But this returns a 404 Error
Could you please try to create a 'root'@'%' user on Cloud SQL as described on page https://cloud.google.com/sql/docs/create-user?
MySQL's permissions are based on the host. When you connect to the MySQL from an external instance, you need to provide the hostname or IP address along with the user name. Please refer to https://dev.mysql.com/doc/refman/5.0/en/account-names.html for more info.