Google Could SQL Cannot connect to DB with new user

与世无争的帅哥 提交于 2019-12-07 23:31:25

问题


I'm trying to install WordPress on Google's App Engine for PHP with Cloud SQL. However, I can't give my WP database user access to their DB.

Looking at the users in my Cloud SQL instance, the grant privilege for the root@% account is unchecked. However, in their WP setup doc, they say to use GRANT ALL for the new database user. See step 6 at:

https://developers.google.com/appengine/articles/wordpress

Subsequently, I cannot give rights to the new WordPress DB to the user account for the app. Anyone know what they expect us to use?


回答1:


Turns out that you have to go through a few steps in the cloud console to execute SQL statements as root@localhost.

Create a .sql file (flat text) and upload it to a cloud storage "bucket" (a directory basically), the filename must contain .sql as it's extension. Then you return to the cloud sql instance and choose import. Import the sql file via a special path of gs://[bucket name]/[filename].sql It automatically recognizes your gs (Cloud Storage) path.

This was briefly mentioned in the setup documentation, however was very vague in where the sql file was uploaded and how to reference it's path.

It will import the commands, you can verify its success via the operations screen. I did try granting root@% the global grant privilege via the mysql user's table by setting its Grant_priv field to 'Y' but I still receive access denied when trying to grant privileges via SQLyog. At least I have a workaround.



来源:https://stackoverflow.com/questions/19757261/google-could-sql-cannot-connect-to-db-with-new-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!