如何从我远程连接到它(服务器)的centos版本7连接到远程数据库?

如何从我远程连接到它(服务器)的centos版本7连接到远程数据库?

问题描述:



我是linux环境的新手。我真的需要尽快做到这一点。

i有一个linux服务器,我使用Windows 8.1中的SSH(非本地)连接到它。(连接正常,可以打开终端和传输文件)

i有一个远程数据库连接(用ip,usernam,passwaord)这里有问题,我不知道如何连接?!

任何人都可以指导我和告诉我该怎么做(走?什么是要求和步骤?



如果有人能帮助我,我将感激不尽



我尝试了什么:




i'm new at linux environment. and i really need to do this as soon as possible.
i have a linux server and i connected to it using SSH(not local) from windows 8.1.(connected fine and can open terminal and transfer file)
i have a remote database to connect(with ip, usernam, passwaord) here is the problem, i don't know how to connect?!
can anyone guide me and show me the way? what is requirements and steps??

i'll be thankful if anyone could help me

What I have tried:

ERROR 2003 (HY000): Can't connect to MySQL server on.... 



应该是maria db还是什么?


should it be maria db or what?

远程机器上的数据库使用端口进行通信,为了从远程PC连接到该端口,您需要将本地端口重定向到它,然后使用该本地端口与远程数据库通信。



SSH端口转发 - 示例,命令,服务器配置 [ ^ ]
The database on the remote machine uses a port to communicate, in order to connect to that port from a remote pc you need to redirect a local port to it and then use that local port to communicate with the remote database.

SSH port forwarding - Example, command, server config[^]