DEV Community

yuki777
yuki777

Posted on • Edited on

Delete multiple MySQL database server on local Mac

Delete MySQL datadir

  • The datadir contains your data.
cd ~/tmp/path-to-your-dir

# Delete "mysql8-name1"
rm -fr mysql/versions/8.0.23/datadir/mysql8-name1

# Delete "mysql8-name2"
rm -fr mysql/versions/8.0.23/datadir/mysql8-name2

# Delete "mysql5-name3"
rm -fr mysql/versions/5.7.31/datadir/mysql5-name3

# Delete "mysql5-name4"
rm -fr mysql/versions/5.7.31/datadir/mysql5-name4
Enter fullscreen mode Exit fullscreen mode

Delete MySQL basedir(option)

  • The basedir contains MySQL programs.
  • If you want to delete basedir too, you can do that.
...
Enter fullscreen mode Exit fullscreen mode

Top comments (0)