3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MySQLの起動、停止、ログイン、ログアウト

Posted at

環境:Cloud9(Linux)

MySQLを起動する

sudo service mysqld start

MySQLを停止する

sudo service mysqld stop

MySQLの起動状態を確認する

service mysqld status

スクリーンショット 2020-06-08 12.06.58.png ↑起動している場合は「running」 スクリーンショット 2020-06-08 12.06.17.png ↑停止している場合は「stopped」 ## MySQLにログインする MySQLの管理者ユーザーであるルートユーザーでMySQLにログインする例。 `mysql -u root` Cloud9はデフォルトでパスワードなしでログインできる状態。

8A25C30A-C4E3-4621-9648-C13EB4EA4366.png
「mysql >」が出ていたらOK。MySQLのコマンドが打てる状態。

MySQLからログアウトする

exit
0293559F-A9E1-4F8B-8347-6EA1680CFD24.png
↑Linuxのコマンドが打てる状態に戻る。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?