MySQL Installation on Mac
In the newest version of MySQL or later one, it has not need to install the startup item “MySQL_StartupItem.pkg”, also use the default password as “root any more. After installed, Pop-up prompts a temporary password, as the message says:
1 | 2016-03-08T15:35:58.686693Z 1 [Note] A temporary password is generated for root@localhost: E%*oVnN?d7sx |
Configure Env.
In terminal, type in “sudo vi /etc/bashrc”,then configure mysql and mysqladmin path in bash.
1 | #mysql |
or in user’s path, touch ~/.bash_profile1
2MYSQL_HOME='usr/local/mysql/bin'
PATH=$PATH:$MYSQL_HOME
Revise the default password
1 | mysqladmin -u root -p password |
Login in terminal
1 | mysql -u root -p |