I know how do skip this problem on ubuntu, but how can i do it on MAC OS?
How can i set password for mysql on MAC?
1) Doesn\'t work
mysqladm
You can do the following on iMac or Mac (High Sierra)
Open a Terminal window, and stop the mysql if it's already running. You can also check this System Preferences > MySQL > see if it is running.
Start MySQL with this command for skipping the main table
sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
Open a new terminal window/tab..
sudo /usr/local/mysql/bin/mysql -u root
This should open "mysql" prompt. Execute the below command:
A ) MySQL 5.6 and below
UPDATE mysql.user SET password=PASSWORD('NewPassord') WHERE user='root';
-- or --
B) MySQL 5.7+
UPDATE mysql.user SET authentication_string=PASSWORD('NewPassord') WHERE user='root';
Restart MySQL, either through System Preferences > MySql or using a command.