我昨天犯了一个错误。我尝试通过分离旧卷并附加新卷来增加现有微t2实例的卷。但是,我没有注意到快照,现在我的网站因为“无法与数据库建立连接”而停机。
150929 09:41:52 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
150929 9:41:52 [Note] Plugin 'InnoDB' is disabled.
150929 9:41:52 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150929 9:41:52 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150929 9:41:52 [Note] Server socket created on IP: '0.0.0.0'.
150929 9:41:52 [Note] Event Scheduler: Loaded 0 events
150929 9:41:52 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.42-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
150929 9:41:53 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown
150929 9:41:53 [Note] Event Scheduler: Purging the queue. 0 events
150929 9:41:53 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete当我试图停止mysql时,我得到了以下提示:
Stoping LNMP...
Stoping nginx... done
* MySQL server PID file could not be found!
Gracefully shutting down php-fpm done
Starting LNMP...
Starting nginx... done
Starting MySQL
. * The server quit without updating PID file (/var/run/mysqld/mysqld.pid).
Starting php-fpm done希望有人能帮我。
发布于 2016-02-11 00:29:21
看起来你的数据库就在那个卷上。检查是否已自动创建快照(右侧的EC2-快照)。如果你有,那么:
”
现在“停止”实例(不要终止!),一旦停止-分离当前卷,并从快照中附加您创建的卷。
启动实例并检查它现在是否正常工作。
但是如果您没有快照,那么就没有什么可做的了--您只需要从头开始设置数据库(创建新数据库、创建表等)。如果mysql在停止/启动后不工作-尝试重新安装它,它应该重新创建现在可能丢失的数据文件夹。
https://stackoverflow.com/questions/35320439
复制相似问题