【发布时间】:2019-06-15 16:31:25
【问题描述】:
我正在尝试通过 cloud shell 在云引擎中安装 mysql
我安装了它:
sudo apt-get -y install mysql-server
并设置密码:
sudo mysql_secure_installation
当我输入密码时,我收到这个错误:
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")
我该如何解决这个问题?
【问题讨论】:
-
您是否意识到只有安装在您的主目录中的软件才会持久存在? Cloud Shell 是一个容器。当容器重新启动时,您的 MySQL 实例将消失。我没有答案,因为 Cloud 不支持您尝试做的事情。
标签: mysql google-compute-engine google-cloud-shell