简体   繁体   English

Openshift Mysql 5.5墨盒如何访问日志?

[英]Openshift Mysql 5.5 cartridge how to access logs?

I need to review the mysql 5.5 server logs but I cannot find a way to get access them via ssh, sftp or mysqlworkbench. 我需要查看mysql 5.5服务器日志,但找不到通过ssh,sftp或mysqlworkbench访问它们的方法。 The mysql cartridge is in a scaled application. mysql盒式磁带在扩展应用程序中。 A solution? 一个解法?

There are a couple things here I'd like to point out that should provide some more information on how things work and how to get to the information you're looking for. 我想指出的几件事应该提供更多有关工作原理以及如何获取所需信息的信息。

  1. Scalable applications with DB's actually have the DB running in a separate gear than the application framework (for scaling purposes). 具有DB的可伸缩应用程序实际上使DB在与应用程序框架不同的齿轮上运行(出于扩展目的)。 For instance, if you ran rhc app show <appname> --gears for one of your scalable applications you would see that there are 2 gears being used and that the ssh information for each of them is different. 例如,如果您为一个可扩展应用程序运行了rhc app show <appname> --gears ,则将看到使用了2个齿轮,并且每个齿轮的ssh信息都不相同。 So if you're just looking to take a quick look at your logs via ssh, you'll need to ssh into the appropriate gear to get to them. 因此,如果您只是想通过ssh快速查看日志,则需要将ssh转换为适当的工具才能使用它们。

  2. You will need to use the rhc port-forward command to forward the right local ports to your database gear and then be able to connect mysqlworkbench from there. 您将需要使用rhc port-forward命令将正确的本地端口转发到您的数据库设备,然后能够从那里连接mysqlworkbench。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM