Set MySQL PATH in macOS




Asked on July 23, 2023
I have installed MySQL in my system macOS Ventura. When I write command mysql, I am getting error as

> mysql

zsh: command not found: mysql


Where to set PATH?




Replied on July 24, 2023
macOs Ventura uses Z shell (zsh). We need to set path in .zshrc file.

1. Go to /Users/<user_name>/.zshrc . It is hidden file, you can see hidden files by pressing shift command and dot altogether.

2. Add the mysql bin path  in .zshrc  file and save it.

export PATH=$PATH:/usr/local/mysql/bin

3. Open new terminal and run mysql command to test it.




Replied on July 24, 2023
Got it. Thanks.

Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us