Docker应用程序无法访问在另一个容器中运行的MySQL(Docker app not able to access MySQL running in another container)
我试图建立一个Dockerized Testlink(LAMP应用程序)实例,并将其连接到另一个容器中运行的MYSQL实例。
$ sudo docker network create mynetwork
使用MySQL实例化容器
$ docker run -d --name mysql -p 3306:3306 --network mynetwork -v /Users/dockervol/mysql:/var/lib/mysql -e 'MYSQL_ROOT_NAME=root' -e 'MYSQL_ROOT_PASSWORD=password' mysql
使用Testlink实例化容器
$ docker run -d -p 80:80 --network mynetwork --name testlink suzukishunsuke/testlink
当我访问http:// localhost / testlink并按照标准安装测试时,它似乎工作。 两个容器是链接的,但是当testlink尝试登录到mysql时,它表示访问被拒绝。
Access denied for user 'root'@'156.18.0.2' (using password: YES)
I am trying to bring up a dockerized instance of Testlink (LAMP application) and connect it to an instance of MYSQL running in another container.
$ sudo docker network create mynetwork
Instantiate the container with MySQL
$ docker run -d --name mysql -p 3306:3306 --network mynetwork -v /Users/dockervol/mysql:/var/lib/mysql -e 'MYSQL_ROOT_NAME=root' -e 'MYSQL_ROOT_PASSWORD=password' mysql
Instantiate the container with Testlink
$ docker run -d -p 80:80 --network mynetwork --name testlink suzukishunsuke/testlink
When I access http://localhost/testlink and follow the standard installation tests it seems to work. The two containers are linked but when testlink tries to login to mysql it says Access denied.
Access denied for user 'root'@'156.18.0.2' (using password: YES)
原文:https://stackoverflow.com/questions/44334847
最满意答案
有一个备用页面说明开发人员包适用于Windows 10版本1607,Windows 8.1,Windows 7 Service Pack 1(SP1),Windows Server 2016,Windows Server 2012 R2,Windows Server 2012和Windows Server 2008 R2 SP1
https://support.microsoft.com/en-nz/kb/3151934
如果单击该页面上的下载链接,则会重定向到您要引用的页面。
所以下载页面上的文档似乎已过时。
There is an alternate page which says that the Developer Pack is for Windows 10 Version 1607, Windows 8.1, Windows 7 Service Pack 1 (SP1), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, and Windows Server 2008 R2 SP1
https://support.microsoft.com/en-nz/kb/3151934
If you click the download link on that page, then you are redirected to the page that you are referring to.
So documentation on the download page appears to be out of date.
相关问答
更多-
电脑不断提示需要更新Microsoft .NET Framework 这个程序[2024-02-13]
微软网站下个3.5版的装上就行了 安装前吧2.0的和1.0的卸载掉 -
来源链接查看更多命令 打开命令提示符 转到您的IIS Express目录 (例如:cd \ Program Files \ IIS Express) iisexpress /? 命令来检查你的iis express的使用字符串 然后有不同的命令来打开你的网站在iis express中 iisexpress /site:WebSite1 为更多的命令访问上面的链接希望它有帮助 The answer was: Is it NOT possible to run a ASP.NET 4/MVC5 using pr ...
-
当您创建C#库时,我假设您选择了.Net标准库而不是Windows经典桌面库。 您可以手动修改csproj文件并将目标框架更改为.Net 4.6.2,如下所示:
net462 一旦你这样做了,UI应该在Project Properties屏幕中更新。 When you created the C# library, I assume you selected a .Net Standard Library instead of a Wi ... -
如果要以.Net 4.6.2为目标,则需要安装.NET Framework 4.6.2 Developer Pack 。 If you want to target .Net 4.6.2, you need to install the .NET Framework 4.6.2 Developer Pack.
-
将其视为为Android制作应用程序:只要Google不破坏界面,您的应用就可以正常运行。 通常当他们改变某些东西时,他们给你时间(通过消息类型“MediaPlayer。[会员名称]可能在Windows 10版本1607之后被更改或不可用。而是使用[...]”)更新您的应用程序。 适用于Windows 10的UWP应用程序在该场景中没有什么不同。 如果我使用此SDK构建应用程序,它是否适用于未来版本的Windows 10? 是。 如果它不起作用,那么他们会明确地告诉你它在版本xxxx中不起作用。 现在他们正 ...
-
有一个备用页面说明开发人员包适用于Windows 10版本1607,Windows 8.1,Windows 7 Service Pack 1(SP1),Windows Server 2016,Windows Server 2012 R2,Windows Server 2012和Windows Server 2008 R2 SP1 https://support.microsoft.com/en-nz/kb/3151934 如果单击该页面上的下载链接,则会重定向到您要引用的页面。 所以下载页面上的文档似乎已过 ...
-
Runtime版本和Target版本是不同的东西。 您需要运行Visual Studio 2017 setup并选择Individual Components下的.net 4.6.2 SDK/Targeting pack : 在VS2017中默认不选择它们。 您还必须为.net 4.7执行此操作,默认情况下也不会安装它。 The Runtime version and Target versions are different things. You need to run Visual Studio 20 ...
-
我想这是出于兼容性的原因。 x86可能会引用
中的 。 win7-x86 -
事实证明我下载了错误的安装程序。 它是4.6,而我需要4.6.2,这是可用的。 这个问题值得删除,但我不会因为其他人可能会犯同样的罪。 It turns out I had downloaded a wrong installer. it was of 4.6 whereas I needed 4.6.2 which is available here. The question deserves deletion but i wont coz some one else might commit the ...
-
尽管Prism 5已被弃用且不再受支持,但您应该能够在面向.NET Framework 4.6.2的应用程序中使用它,因为后者是.NET Framework 4到4.6的向后兼容的就地更新。 1。 在Visual Studio中创建一个新的WPF应用程序项目,在解决方案资源管理器中右键单击该项目,然后选择“管理NuGet包”,然后单击左侧窗格中的“在线”项,搜索“Prism”并安装“Prism(Deprecated)”套餐。 这应该下载并参考Prism 5程序集,您应该能够在之后构建应用程序。 Althou ...