Google可以SQL无法用新用户连接到数据库

编程入门 行业动态 更新时间:2024-10-25 10:24:40
本文介绍了Google可以SQL无法用新用户连接到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正尝试在Google的App Engine for PHP和Cloud SQL上安装WordPress。但是,我无法让我的WP数据库用户访问其数据库。

查看我的Cloud SQL实例中的用户,root @%帐户的授予权限没有被检查。但是,在他们的WP设置文档中,他们说要为新的数据库用户使用GRANT ALL。请参阅第6步:

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

随后,我无法将新的WordPress数据库权限授予该应用的用户帐户。任何人都知道他们期望我们使用什么?

解决方案

原来,您必须在云端控制台中执行几个步骤以root @ localhost身份执行SQL语句。

创建一个.sql文件(平面文本)并将其上传到云存储桶(基本上是一个目录),文件名必须包含.sql,因为它是扩展名。然后您返回到云端sql实例并选择导入。通过gs:// [存储桶名称] / [文件名] .sql的特殊路径导入sql文件它会自动识别您的gs(云存储)路径。

在设置文档中简单地提到了这一点,但是在上传sql文件的位置以及如何引用它的路径时非常模糊。

它会导入命令,您可以通过操作屏幕验证其成功。我尝试通过将其Grant_priv字段设置为'Y'来尝试通过mysql用户表授予root @%全局授权特权,但当尝试通过SQLyog授予权限时,我仍然收到拒绝访问权限。至少我有一个解决方法。

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:

developers.google/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?

解决方案

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.

更多推荐

Google可以SQL无法用新用户连接到数据库

本文发布于:2023-10-17 12:57:50,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:新用户   连接到   数据库   Google   SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!