Install MySql 8.0.30 on Zsh Shell | zsh: command not found: MySql (Resolved) on MacOS M1/M2

Опубликовано: 26 Март 2026
на канале: Prashant Rana
7,009
104

In this Video I will be showing you the Steps how you can Install MySql on your MacOS Machines M1/M2.
And If you are getting this kind of problem "zsh: command not found: mysql", Then I have also shown you how you can resolve that error by following the Steps in adding up the Path in Terminal.

MySQL Download URL - https://dev.mysql.com/downloads/mysql/

MySQL Default Installation Location - /usr/local/mysql-8.0.30-macos12-arm64/bin

Terminal Commands -
Check Shell Installed on Machine - echo $SHELL

Check Shell Installed on your Machines - cat /etc/shells

Create Shell File =
Create Bash_Profile/ZSH ENV File - touch .bash_profile/touch .zshenv (Create Shell Depending upon Default Shell on your Machine)
We can also create .zprofile rather than .zshenv File.

Open Bash File - vi .bash_profile/vi .zshenv

Export Command for MySQL - export PATH=${PATH}:/usr/local/mysql-8.0.30-macos12-arm64/bin

Exit Terminal Command - exit

MySQL Commands -
First We Need to Open the Terminal and Write MySQL Command - mysql -u root -p

Command to Check Databases - show databases;
SQL Command to Create Database - create database database_name;
Use Specific Database - use database_name;

#mysql #shell #zshell #java