Can I SSH to MySQL with the GUI tools?

后端 未结 7 1583
臣服心动
臣服心动 2021-01-02 06:23

I have a ubuntu server which I\'ve locked down to only HTTP, HTTPS and SSH (port 30000). On this box I have a MySQL server which 99.9% of the time is only used locally. Ev

7条回答
  •  执念已碎
    2021-01-02 07:11

    There two ways to use the GUI mysql tools on a remote MYSQL machine.

    I'm assuming the remote machine is running linux.

    Option 1.

    SSH port forwarding.

    ssh -L 3306:proxy:3306 username@remotehost

    Basically you forward port 3306 on your local machine to 3306 on your remote machine, then you tell your graphical MYSQl tool to connect to localhost:3306 and you assume that your remote machine is listening on the standard port of 3306

    http://magazine.redhat.com/2007/11/06/ssh-port-forwarding/

    Also ssh -D 3306 username@remotehost should be similar

    Option 2.

    If you are running xserver on your remote machine and have the GUI tools installed on your remote machine you can tunnel your GUI over the SSH connection.

    ssh -X username@remotehost and then start your GUI tools over on remote machine from the command line.

提交回复
热议问题