2
1

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.

【初心者】データベースが作成できない時の対処法(create database dotinstall_todo_app;)

Last updated at Posted at 2020-01-16

mysqlをいじっていたらデータベースが作れなくなる事態に陥りました^^;

create database dotinstall_todo_app;

ERROR 1006 (HY000): Can't create database 'dotinstall_todo_app' (errno: 2)

#エラーに対して試したこと

ネットで解決方法を調べていると$ mysql.server restartすればいいと記載が!
しかし、上記コマンド通りmysqlを再起動してもERROR! MySQL server PID file could not be found!

またもエラー・・・・

#解決方法

$ ps ax | grep mysql

sudo kill -TERM 17259 //mysqldを削除

その後、mysql.server restartではなく
sudo mysql.server restartを実行する

rooter:var neko$ sudo mysql.server restart
Password:
Sorry, try again.
Password:
 ERROR! MySQL server PID file could not be found!
Starting MySQL
.. SUCCESS! 

これでcreate database dotinstall_todo_app;が作成できた。

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?