Error 1045: access denied while Setting up PHPMyAdmin in Google Compute Engine using Google Cloud SQL

724 views Asked by At

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. enter image description here

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

1

There are 1 answers

0
Jay Zhu On

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.