Installing MySQL(5.7) on MacOS (Monterey)

Using Home-brew :

Use these commands in sequence to install MySQL(5.7) on MacOS(Monterey)


We are aiming to install mysql version 5.7.

If homebrew is not installed on your system then follow this step 1, to check whether hombrew installed or check execute step 2. 

Step: 1  -  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Step: 2 - brew -v 

Step: 3 - brew info mysql 

Step: 4 - brew info mysql@5.7

Step: 5 - brew install mysql@5.7 (installation )


if got something like this 




 

then try this solution : MySQL Error Solution


Step: 6 -  echo 'export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"' >> ~/.zshrc 

Step: 7 -  now re-start your terminal.

Step: 8 -  mysql_secure_installation 

For all the further questions opt for “yes”


Step: 9 - mysql -u root -p 


now use your MySQL knowledge to implement Database


Stop service:

>> brew services stop mysql@5.7


List services:  

>> brew services list


Uninstall MySQL:

>> brew uninstall mysql@5.7

>>sudo rm -rf /usr/local/var/mysql 

(It will remove all data regarding mysql)

Comments

Popular posts from this blog

Screen Saver Development In C language