default password for mysql_secure_installation in mac 1

default password for mysql_secure_installation in mac

$ brew services stop mysql
$ pkill mysqld
$ rm -rf /usr/local/var/mysql/ # NOTE: this will delete your existing database!!!
$ brew postinstall mysql
$ brew services restart mysql
$ mysql -uroot

Here is what the above code is Doing:
1. Stop the mysql service
2. Kill any running mysql processes
3. Delete the existing mysql data directory
4. Reinstall mysql
5. Restart the mysql service
6. Connect to mysql as root

Similar Posts