安装MySQL后无法SSH到Google Cloud VM

乔希·格林劳

我正在尝试使用免费的f1.micro实例在Google Cloud Platform上设置小型博客服务器。我使用Ubuntu 20.04 LTS作为基本映像(Ubuntu是我完全熟悉的唯一Linux发行版),尽管我尝试了20.10。一切正常,直到我安装MySQL。是我要遵循的指南。每次失败后,我都删除了VM,然后重新开始了。

这些是VM设置:

虚拟机设置

除了指南中列出的步骤之外,我还尝试将ssh添加到ufw中,以防万一。

sudo ufw allow ssh
sudo ufw enable

I also tried running this prior to installing MySQL, based on this article after failing the first couple of times.

sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get dist-upgrade

Once I try installing mysql-server the ssh prompt hangs here:

ssh挂

I've tried reconnecting immediately and I've tried waiting overnight, but I always get stuck here when I try to connect again (it stays like this for a very long time before failing):

无法重新连接

Jose Luis Delgadillo

I experienced a similar issue with a MySQL Instance in GCP, the first issue was related with the type of the VM instance I used, I had a f1-micro machine type on this VM Instance and suddenly I wasn’t able to access the ssh. As this type of VM Instance has only 0.6GB of memory, it became out of memory soon, I changed it to a e2-medium that is value by default and it resolved my problems this time. As the Instance was out of memory the services in the instance started to fail, it was the reason that I can't access my instance.

At another time I started again with similar issues, but this time, the problem was the disk, I only had 10 GB and there was a process filling my disk, when a partition was out of space, the instance started to fail again. I only resized my disk, now my instance disk is 20GB and is working fine.

Having said that, I suggest increasing your resources per your convenience to enhance your performance, because to have the problems you described is a good indicator that your existing machine type is not a good fit for your workloads you run on that instance.

So, I suggest to change the machine type to adjust your memory and you can follow the next steps for these tasks please visit the following link to get further information about it.

Changing a machine type

1.- Go to the VM Instances page.

2.- In the Name column, click your instance.

  1. From the instance details page, complete the following steps:

    a) Click the Stop button to stop the instance, if you have not stopped it yet.

    b) After the instance stops, click the Edit button at the top of the page.

    c) Under the Machine configuration section, select the machine type you want to use, or create a custom machine type to increase only the Memory.

    d) Save your changes and start again your VM Instance.

You can resize your disk following this guide or with the following command:

gcloud compute disks resize DISK_NAME --size DISK_SIZE

Or with the Console:

  1. Go to the Disks page to see a list of zonal persistent disks in your project.
  2. Click the name of the disk that you want to resize.
  3. On the disk details page, click Edit.
  4. In the Size field, enter the new size for your disk.
  5. Click Save to apply your changes to the disk.

After you resize the disk, you must resize the file system so that the operating system can access the additional space.

注意:请勿将引导磁盘的大小调整为超过2 TB,因为这是限制。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

似乎无法安装Google Cloud Managed VM

来自分类Dev

似乎无法安装Google Cloud Managed VM

来自分类Dev

获取Google Cloud Engine VM的root密码

来自分类Dev

来自Google Cloud SQL的VM拒绝连接

来自分类Dev

Google Cloud VM内存已用完100%

来自分类Dev

如何重置Google Cloud Linux VM ssh * password *?

来自分类Dev

如何重置Google Cloud Linux VM ssh * password *?

来自分类Dev

如何在Google Cloud VM上安装Magento主题?

来自分类Dev

从 Windows 和 Putty 到 Google Cloud VM 的 SSH 隧道:网络错误:连接超时

来自分类Dev

无法SSH到VM

来自分类Dev

如何从 Google Cloud 的 VM 转储和下载 mysql

来自分类Dev

Cloud Datalab僵尸VM

来自分类Dev

Cloud Datalab僵尸VM

来自分类Dev

是否可以从Google托管VM连接到Google Cloud SQL?

来自分类Dev

在Ubuntu中设置Google Cloud Managed VM时出现DockerDaemonConnectionError

来自分类Dev

Google Cloud Dataflow VM上的jstack和其他工具

来自分类Dev

在Google Cloud VM中找不到库标题

来自分类Dev

如何防止Google Cloud Dataproc群集VM实例自动关闭?

来自分类Dev

sudoing 要求输入密码时的 Google Cloud VM

来自分类Dev

Google Cloud 不断执行程序 vm 实例

来自分类Dev

在 Google Cloud VM 中找不到 Conda 命令

来自分类Dev

从在Google Cloud VM实例上运行的应用程序访问Google Secrets-将Cloud API分配给VM

来自分类Dev

使用Cloud Functions将文件从Google Cloud Storage传输到Windows VM实例

来自分类Dev

如何在Google Cloud Deep Learning VM上安装tensorflow-transform?

来自分类Dev

部署后要更改Google Cloud Deep Learning VM映像版本吗?

来自分类Dev

是否可以将Google Cloud Platform中VM的内容备份到特定存储桶?

来自分类Dev

无法连接到Google Cloud VM实例上设置的mongodb副本

来自分类Dev

访问在Google Cloud VM实例上的docker容器中运行的MySQL数据库

来自分类Dev

无法从Ubuntu SSH到Debian VM

Related 相关文章

  1. 1

    似乎无法安装Google Cloud Managed VM

  2. 2

    似乎无法安装Google Cloud Managed VM

  3. 3

    获取Google Cloud Engine VM的root密码

  4. 4

    来自Google Cloud SQL的VM拒绝连接

  5. 5

    Google Cloud VM内存已用完100%

  6. 6

    如何重置Google Cloud Linux VM ssh * password *?

  7. 7

    如何重置Google Cloud Linux VM ssh * password *?

  8. 8

    如何在Google Cloud VM上安装Magento主题?

  9. 9

    从 Windows 和 Putty 到 Google Cloud VM 的 SSH 隧道:网络错误:连接超时

  10. 10

    无法SSH到VM

  11. 11

    如何从 Google Cloud 的 VM 转储和下载 mysql

  12. 12

    Cloud Datalab僵尸VM

  13. 13

    Cloud Datalab僵尸VM

  14. 14

    是否可以从Google托管VM连接到Google Cloud SQL?

  15. 15

    在Ubuntu中设置Google Cloud Managed VM时出现DockerDaemonConnectionError

  16. 16

    Google Cloud Dataflow VM上的jstack和其他工具

  17. 17

    在Google Cloud VM中找不到库标题

  18. 18

    如何防止Google Cloud Dataproc群集VM实例自动关闭?

  19. 19

    sudoing 要求输入密码时的 Google Cloud VM

  20. 20

    Google Cloud 不断执行程序 vm 实例

  21. 21

    在 Google Cloud VM 中找不到 Conda 命令

  22. 22

    从在Google Cloud VM实例上运行的应用程序访问Google Secrets-将Cloud API分配给VM

  23. 23

    使用Cloud Functions将文件从Google Cloud Storage传输到Windows VM实例

  24. 24

    如何在Google Cloud Deep Learning VM上安装tensorflow-transform?

  25. 25

    部署后要更改Google Cloud Deep Learning VM映像版本吗?

  26. 26

    是否可以将Google Cloud Platform中VM的内容备份到特定存储桶?

  27. 27

    无法连接到Google Cloud VM实例上设置的mongodb副本

  28. 28

    访问在Google Cloud VM实例上的docker容器中运行的MySQL数据库

  29. 29

    无法从Ubuntu SSH到Debian VM

热门标签

归档