0
0

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

mysql再インストール

アンインストール

$ brew uninstall mysql

$ sudo rm -rf /usr/local/var/mysql
$ sudo rm -rf /usr/local/Cellar/mysql*
$ sudo rm -rf /usr/local/bin/mysql*
$ sudo rm -rf /usr/local/var/mysql*
$ sudo rm -rf /usr/local/etc/my.cnf
$ sudo rm -rf /usr/local/share/mysql*
$ sudo rm -rf /usr/local/opt/mysql*
$ sudo rm -rf /etc/my.cnf

$ sudo rm -rf mysql.sock mysql.sock.lock

再インストール

$ brew install mysql

途中エラーが出てあせった

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate —all —install —force

$ softwareupdate —all —install —force

MySQLを起動

$ mysql.server start
$ mysql -uroot

rootのパスワード変更

SET PASSWORD = 'hogihogi';

なんかいっつもこんなんやってる気がする。。。

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
参考

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?