Могу ли я SSH к MySQL с помощью инструментов GUI?

Как @BillKotsias, я использовал наследование, и это сработало для меня.

Я изменил этот беспорядок (который требовал всех заголовков boost в моей декларации * .h)

#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <boost/accumulators/statistics/moment.hpp>
#include <boost/accumulators/statistics/min.hpp>
#include <boost/accumulators/statistics/max.hpp>

typedef boost::accumulators::accumulator_set<float,
 boost::accumulators::features<
  boost::accumulators::tag::median,
  boost::accumulators::tag::mean,
  boost::accumulators::tag::min,
  boost::accumulators::tag::max
 >> VanillaAccumulator_t ;
std::unique_ptr<VanillaAccumulator_t> acc;

в это объявление (* .h)

class VanillaAccumulator;
std::unique_ptr<VanillaAccumulator> acc;

, а реализация (* .cpp) была

#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <boost/accumulators/statistics/moment.hpp>
#include <boost/accumulators/statistics/min.hpp>
#include <boost/accumulators/statistics/max.hpp>

class VanillaAccumulator : public
  boost::accumulators::accumulator_set<float,
    boost::accumulators::features<
      boost::accumulators::tag::median,
      boost::accumulators::tag::mean,
      boost::accumulators::tag::min,
      boost::accumulators::tag::max
>>
{
};
10
задан Neil Middleton 13 May 2009 в 17:10
поделиться

5 ответов

ssh -L localport:127.0.0.1:remoteport user@remotehost

где localport - это несвязанный порт в вашей локальной системе, remoteport - это порт, на котором MySQL слушает, 127.0.0.1 - это адрес обратной связи в вашей удаленной системе, пользователь - ваше имя пользователя, а remotehost - адрес удаленной системы.

Затем укажите клиенту MySQL на 127.0 .0.1: LocalPort . Соединение будет перенаправлено через туннель SSH на удаленный порт.

13
ответ дан 3 December 2019 в 17:22
поделиться

Если вы используете Windows или Unix на своем локальном компьютере, PuTTY - отличный инструмент для этого. Вот руководство по переадресации портов:

http: //www.cs.uu. nl / Technical / services / ssh / putty / puttyfw.html

4
ответ дан 3 December 2019 в 17:22
поделиться

Настройте туннель с помощью клиента SSH для сопоставления локального порта через туннель с портом на удаленной машине, а затем подключитесь к локальному порту с помощью клиента.

man ssh будет содержать кровавые подробности, но вам, вероятно, лучше поискать в Интернете что-нибудь более легкое для чтения.

3
ответ дан 3 December 2019 в 17:22
поделиться

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, а затем запустите инструменты графического интерфейса пользователя на удаленном компьютере из командной строки.

1
ответ дан 3 December 2019 в 17:22
поделиться

Я предлагаю обратиться к phpMyAdmin - веб-инструменту для администрирования MySQL , очень хорошему (требуется PHP). Его можно установить с помощью обычных методов Ubuntu (например, Synaptic)

или выполнить туннелирование X с помощью SSH, как упомянуто выше.

-1
ответ дан 3 December 2019 в 17:22
поделиться
Другие вопросы по тегам:

Похожие вопросы: