问题标签 [azure-mysql-database]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
439 浏览

php - 在 Azure 和 MySql-In App 下运行的 Joomla configuration.php 数据库设置

我正在使用数据库的 MySQL In-App 选项在 Azure 下运行 Joomla。一切顺利,但我无法让 JConfig 中的数据库配置变量从 MYSQLCONNSTR_localdb 环境变量中动态提取。

我已经尝试过这里发布的 MS 建议的解决方案https://blogs.msdn.microsoft.com/azureossds/2016/12/09/mysql-in-app-configuration-for-php-content-management-systems/和尝试了各种从环境变量中提取信息并将变量设置为结果的方法,但均未成功。唯一似乎有效的是对主机地址进行硬编码,这是有问题的。

一个例子可能是这样的:

到目前为止,硬编码地址的所有变体都是“错误”。在前端。

0 投票
1 回答
76 浏览

azure-table-storage - 从存储中检索 Azure MySQL 服务器指标 - 表或 eventthub

我需要从 Azure 中的 Microsoft.DBforMySQL/servers 获取“storage_percent”、“io_consumption_percent”和“connections_failed”。我找不到任何相同的 Rest API。我尝试将数据从诊断设置导出到存储以及 Eventhub。但它也没有奏效。

有前进的方向吗?

在此之后,我需要从程序中获取记录并传输到外部系统。

谢谢。

0 投票
1 回答
303 浏览

amazon-aurora - 使用 Attunity Replicate MSM 将数据从 RDS MySQL 迁移到 Azure Database for MySQL 时,迁移任务在“加载数据本地 infile”时失败

我尝试使用“Attunity Replicate for Microsoft Migrations (Replicate MSM)”将数据从Amazon RDS MySQL迁移到Azure Database for MySQL 。 为此,我在本地 Windows 10 机器上设置了 Replicate MSM 工具,然后定义和测试源和目标数据库端点,例如。RDS 作为源,Azure 作为目标,安装所需的 mysql、odbc 驱动程序并在两个数据库上启用二进制日志记录、local-infile 参数。但是现在当我运行迁移任务时,它只会在目标数据库上创建迁移表的模式,并且在“加载数据本地文件”命令中失败。这是堆栈跟踪:

根据 Azure 文档:

支持 LOAD DATA INFILE,但必须指定 [LOCAL] 参数并将其定向到 UNC 路径(通过 SMB 装载的 Azure 存储)。

如果这是解决方案,请解释如何实现它。

注意:RDS 和 AZURE 上的 MySQL 服务器版本均为 5.6

0 投票
1 回答
554 浏览

java - 使用 Java(JDBC) 连接 Azure 数据库失败

我正在尝试使用 JDBC 连接我的 Azure 数据库。但它无法连接。我已正确使用服务器名称、用户名、数据库名称和密码。

使用 Mysql 连接器 v8.0.13

我期待显示“成功创建与数据库的连接”。但它显示“无法创建与数据库的连接”。

0 投票
2 回答
1227 浏览

azure - 无法从我的 Webapp 连接到我的 MYSQL Azure - 1045,“用户 'dbadmin'@'xx.xx.xx.x' 的访问被拒绝(使用密码:是)

我在我的 Webapp 中不断收到以下错误

MySQL Azure:

  • 托管在地区 > 法国中部
  • 允许访问 Azure 服务
  • 通过 Azure 门户使用用户名“dbadmin”和服务器“jetbase”创建

SQLAlchemy db_uri 看起来像这样

网络应用程序

也在法国中部举办

在我的开发计算机上本地运行时,相同的 docker 映像可以访问数据库(我在 Security 下的客户端 IP 地址中手动添加了 ip。)

有人可以帮我调试吗?

0 投票
2 回答
553 浏览

spring-boot - Spring Boot - 无法连接 Azure MySQL 数据库

我是从 Spring Boot 应用程序连接 Azure MySQL 数据库的新手。

以下是中提到的片段application.properties

我遇到了以下异常

我用谷歌搜索过,有人提到需要将MySQLConnector的版本更新为8.0.13

请帮我找到解决方案。

0 投票
1 回答
246 浏览

c# - 在 Azure Functions v2 上使用 MySqlDatabase (MySql.Data.MySqlClient) -“无法解析服务”

我创建了一个使用MySql.Data.MySqlClient依赖项的 Azure Functions 应用 ~v2 项目。

该项目设置为还使用该SwashBuckle库来创建可调用的 API。

当我从本地设置执行我的项目时,它工作正常。然而,当我将 Functions 应用程序发布到我们的 Azure 服务器并尝试在那里测试该函数时,我收到此错误:

System.InvalidOperationException:尝试激活“MyFunctionApp.PostsService”时,无法解析“MyFunctionApp.MySqlDatabase”类型的服务。

在 Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp,Type 类型,Type requiredBy,Boolean isDefaultParameterRequired)

...

我的StartUp.cs

我的MySqlDatabase.cs

这是我正在调用的服务,它抛出了上面提到的错误(PostsService.cs):

0 投票
2 回答
1409 浏览

python - Azure Functions (Python) 无法使用 [SSL: WRONG_VERSION_NUMBER] 连接到 Azure MySQL 实例

我正在使用 Python 创建一个简单的 Azure 函数。它只是简单地从 Azure MySQL 实例中读取并将某些内容写回同一实例。但是,我无法成功连接到数据库。

当我使用时,代码在我的本地机器上运行良好func host start,我也使用了相同的 Azure MySQL 实例。

但是,在我部署了 Azure 函数后,它不起作用并给我以下错误:

我还尝试在 Azure 门户中禁用“SSL 强制”,并启用Allow access to Azure services,这没有帮助。

任何帮助和意见将不胜感激!谢谢!

0 投票
1 回答
1173 浏览

azure - I can't seem to connect to my Azure Database for MySQL server from my Azure Linux VM

I have a Linux Virtual Machine (Debian 9) deployed in Azure with Service Endpoints for Sql enabled and properly added -if I navigate the portal towards the VNet and enter the Service Endpoints tab, I can clearly see the Sql Service Endpoint listed. Just FYI, the reason for the Service Endpoint is that the VM has a dynamic IP, so I can't just whitelist it in the DB resource's configuration.

On the other hand, I have an 'Azure Database for MySQL server' deployed in the same resource group, same location and whatnot, but I can't seem to connect to it.

The steps I take when I try to connect are as follow:

  • I connect to the VM through SSH.
  • In my VM I have mysql-server installed
  • I write mysql --host <fully qualified server name> --user <server admin login name>@<server name> -p
  • I get the following error: "ERROR 9002 (28000): Server is not ready for incoming connections."

I've been reading the documentation and searching in forums for a reason why this might be happening, but I simply cannot seem to make it work. I have tried changing the status of the "Allow access to Azure services" option in the Connection security tab of the DB resource, but it doesn't seem to matter.

Could anyone have any idea of how I might go about solving this??

0 投票
1 回答
427 浏览

mysql - Azure 流分析输出到 MySQL 数据库

我是 Azure 的新手,但我想进行如下图所示的设置:(设备 -> IoT 中心 -> 流分析 -> 存储 -> 应用程序)

设定目标

我的主要问题是流分析输出到数据库(我有一个托管在 Azure 中的 MySQL 数据库)。我不断收到“提供的 SQL 数据库服务器域名不在受支持的域列表中”。当我尝试配置流分析的输出时。我将其配置如下:

数据库:测试

服务器名称: X.mysql.database.azure.com(在 MySql 服务器的“服务器名称”中找到)

用户名: X(“X 是我的用户名”)

密码: X(“X 是我的密码”)

表:测试(在测试数据库中制作的表)

我不能使用“从您的订阅中选择 SQL 数据库”,因为它没有找到任何数据库。

我想知道是否不支持 MySQL,或者我只是做错了什么?

(顺便说一句:MySQL 服务器连接安全性将“允许访问 Azure 服务”设置为 ON,将“强制 SSL 连接”设置为禁用)