Can not connect to mariadb after creating a new instance from a linux Lightsail snapshot

0

It was just last week this was working just fine, I was able to create a new instance from a lightsail snapshot (linux) and everything worked well. But today when I try to create another instance from a newer snapshot, I couldn't connect to mariab, here is the error message:

ERROR 2002 (HY000): Can't connect to server on '127.0.0.1' (115)

I am trying to connect to the database using this command:

mysql -h 127.0.0.1  -u root -p <redacted>

I tried some solutions I found on google but still can not make it work, can anyone help help to provide some insights? Thank you!

  • Hi, I updated your question to redact some information that would be best to not share publicly.

ywsz
質問済み 3ヶ月前163ビュー
1回答
0

Is MariaDB running locally on the Linux host? There should be output showing that it's listening on the default port sudo netstat -tulpn | grep -w 3306

It would also be worth double-checking the syntax of the mysql command, according to the MariaDB Command-Line Client page https://mariadb.com/kb/en/mariadb-command-line-client/

-p, --password[=name]

Password to use when connecting to server. If you use the short option form (-p), you cannot have a space between the option and the password

profile picture
エキスパート
Steve_M
回答済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ