Я создал экземпляр стека tomcat в облаке Google, и он поставляется с mysql 5.5. Я могу получить к нему доступ через терминал через ssh, затем ввести командную строку mysql -u username -p
. Тем не менее, я пытаюсь получить доступ к базе данных через mysqlworkbench, но я не смог получить соединение.google cloud tomcat stack mysql access
Итак, мне нужно использовать метод подключения «Стандартный TCP/IP через SSH», и мне нужно подтвердить, что у меня есть параметры справа.
SSH Hostname: the IP of my instances <br/>
SSH Username: my google account username? this is the one i use to login when setting up the gcloud ssh<br/>
SSH Password: the password for the account<br/>
SSH Key file: ~/.ssh/google_compute_engine<br/>
MySQL Hostname: i put tomcat_rmre which is the hostname for the database when I do "show variables" in the terminal<br/>
MySQL Server Port: the port in "Show variables"<br/>
Username: username of the database<br/>
password: password of the database
Когда я испытываю соединение, я получаю Lost connection to MySQL server at 'reading initial communication packet', system error: 0