How to Install & configure Mysql on a Mac
HTML-код
- Опубликовано: 9 июл 2024
- In this video you will learn how to download, install, configure and run the free version of Mysql on a Mac using Mysql Workbench GUI. You will also learn how to create a user and grant the user privileges, setup a Mysql connection for new users and much more. You will also learn how to startup and shutdown the Mysql server.
This video can be shared using • How to Install & confi...
Download Mysql community server at dev.mysql.com/downloads/mysql/
Download Mysql Workbench at dev.mysql.com/downloads/workb...
Follow the video carefully to setup and run your own instance on your operating system. Наука
Thank you, I have been trying all day to get this installed until I found you video and it worked perfectly. I am new to Mac.
Great!
Hello, at 7:23 I am getting "command not found: mysql" error. Tried to quit the terminal and launched new terminal but same error comes up. Please help!
Thank you. Your video is really useful.
Thank you!) it was useful for me)
Thank you, very helpful
Thanks for this wonderful work and may God continue to increase and bless you hand work.
Is there a way to do this without messing with the terminal? I’m not very tech savvy and I’m very anxious about messing with terminal it seems complicated
Thank you so much. Blessings!
Good Work...Many thanks :)
thank you very much, very good explanation.
Thanks
hi there, thanks for your video. would you be available for 1h consultation about do the settings on my mac please?
Thankyou this helped a lot
Great
How I can unlink the soft link created using line command ln -s /usr/local/mysql/bin/mysql /usr/local/bin thank you
THANK YOU !!!!!!!!!! SO MUCH!!!!
THANK YOOOOU!!!!!!
I got ‘xxx is not in the sudoers file. This incident will be reported’ after I entered password in terminal. Why is this happening??
Thanks!!! Its works on Mac OS Catalina !!!!
Great!
Thank u! :)
Sure
could you pls make an other video which consisting of how to include that sudo.etc path into bash profile clearly
Hi Sruthi, please note that to install applications on your computer using "sudo or Supper user" you need to have admin privileges to the device in which you are using. Otherwise, it will be impossible if you don't have such privileges. If you are the admin user of your Mac, all you have to do is to change from z shell to bash shell. I will make a video on that as well
Awesome!
Thanks!
Your video was very clear but alas didn’t work for me. I find that under my /usr folder is an alias called mysql which point to a folder named as the mysql installation dmg file. So the command sudo on -s /usr/local/mysql/bin/mysql/bin/mysql /usr/local/bin does do anything.MySQL workbench works fine and I can create a new database but MySQL won’t work from Localhost which means MyAdmin can’t be used to administer MySQL. I’m stuck.
I'm stuck too, did you figure out how to solve that
Hi Earnest IT, Can you please help me with my previous request? I am having trouble with setting up the terminal. I have provided you a copy of the error message I got from the terminal console. Thanks
see my reply to your original comment.
Heyyy might you know what should I do wenn I got "Unhandled exception: 'caching_sha2_password'" when I was trying to create an admin account ?
Hi Zhang. Use the link below to review Mysql documentation section that speaks specifically about caching_sha2_password issue you are facing. I hope this helps. dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-data-dictionary-changes
if i'm using xampp which localhost will show me the phpadmin page?
Hi Valerie, you have to set that up. Use the article or link to guide you in the process
www.richardcastera.com/blog/how-to-setup-a-local-web-server-on-your-computer-using-xampp/
Help me. MySQL workbench packages require Big Sur (11.1 or newer) now:(
Here is an updated video on MySQL if you are on windows. ruclips.net/video/pUjjs-6J_vU/видео.html
it doesnt work for zsh, "mysql -u root -p" says "zsh: command not found: mysql", please help me oout.
Ok. Change your default shell back to bash, install the mysql, then change it back to Z shell.
Steps
Change Zsh to bash: copy and paste this on terminal, then hit enter: chsh -s /bin/bash
Change bash back to Zsh: Copy and paste this on terminal after you have installed mysql, then hit enter: chsh -s /bin/zsh
Everything has worked perfectly so far, but for some reason "show dadtabases;" in the workbench didn't cause anything to happen. Am I supposed to click on something? I hit enter and nothing pops up.
Hi Mikael, directly above the show databases; command are two execution signs that you can click to run that sql code. when you do, you should see a list of databases within your instance.
in terminal it is showing that "sudo in - command not found " what should i do ???????
Hello Varma, please note that it is not "sudo in" it is "sudo LN" lower case, not i as in ink, but l as in link. Also, note that there is a space before the last section of the command. I have re-written it here so you can just copy and paste on your terminal window: sudo ln -s /usr/local/mysql/bin/mysql/bin/mysql /usr/local/bin; then cmd enter on your computer.
I cant type anything after the first command. Cursor isnt working wat to do?
If your cursor is not working, try to use the backspace button on you keyboard or restart your computer and try again
hi ! i've a problem with my mysql installation.
After ran #sudo ln -s /usr/localhost/msql/bin/msql /usr/local/bin# all things is ok! , but when ran # mysql -u root -p# it shows me # command not found : mysql .
please what should i do to finalise my installation ?
Hello Steve, the reason you are getting the error message is because the /usr/local path is not yet written to your bash profile. So, you should first edit the bash profile to include that path, then try to login again. Perform any of the following on terminal
Open a terminal window and type in the code below, then enter on your keyboard
Sudo nano /etc/paths
Add the following lines to that file. To insert such changes, press i on your keyboard, then use the down arrow to screw down to a new line and insert the two changes below
/usr/local/mysql/bin
/usr/local/mysql/support-files
To save and exit, press esc on your keyboard, then :wq! Then enter.
After this step, restart your terminal and proceed with the installation as shown in the video.Video link is again included here for you@
Earnest IT Thanks my g!
@@ITVidz THANK YOU SO MUCH
@@ITVidz I want to die bruh it won't save and exit
I did exactly what you told us, but at 7:31 it says zsh: command not found: mysql
what should I do? I've been on this for hours now :(
same problem, can u tell me how to fix it
Same problem
Hi ! When I use
*sudo ln -s /usr/local/mysql/bin/mysql/bin/mysql /usr/local/bin*
and type in my password, my terminal returns ln: /usr/local/bin/mysql: File exists. I then try to do mysql -u root -p and it returns
zsh: command not found: mysql
What should I do? I tried changing the default shell back to bash, install the mysql, then change it back to Z shell.
On macOS Catalina, open terminal and try the following.
Sudo nano /etc/paths
With that file open, add the following to the bottom of the file. To do this, just click the (i) key on your keyboard to activate insert action.
/usr/local/mysql/bin
Safe the file by pressing esc, then :wq!
Close and reopen the terminal window, then try running: mysql -u root -p
Hopefully, this should work.
@@ITVidz add what ? I have exactly the same issue
Hey! I've gotten through all these steps, but when I try to execute the "mysql -u root -p" command I receive a message in terminal stating "-bash: mysql: command not found". Can you provide any guidance here?
Try to add aliases to your shell's resource file to make it easier to access mysql and mysqladmin from the command line, then try to connect as root using the Mysql -u root -p.
The syntax to add alianses to bash is as follows:
alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
Even better, add /usr/local/mysql/bin to your PATH environment variable. You can do this by modifying the appropriate startup file for your shell. For more information, see Section 4.2.1, “Invoking MySQL Programs”.
If this don’t work, use this link
dev.mysql.com/doc/refman/8.0/en/dynindex-command.html
to review other options for Mysql Documentation especially the bash section.
Hi Carl, if the solution I provided earlier does not work, use this one instead. Open terminal and install MySql using the command below
brew install MySql
Then click enter on your keyboard
Once that is done, login to MySql as root using
MySql -u root -p
Then inter your root password. This should work.
@@ITVidz still not working dude i tried
@@priyanshus6108 If you do not have admin access to your computer, you will not be able to succeed with such installation. Another reason, could be that the software on your system is not up to date or something. So, check that and retry. Also, macOS Catalina now uses Zshell instead of bash, so check for compatibility of MySql with that shell, then try installation again. It could be a host of reasons why you are not able to install and configure MySql on your system
Hello Carl
This is the problem with your $PATH:
/usr/local//usr/local/mysql/bin/private/var/mysql/private/var/mysql/bin
which probably doesn't exist.
Instead you want ${PATH}:/usr/local/mysql/bin.
So do export PATH=${PATH}:/usr/local/mysql/bin.
do this export and you see working
Hi Earnest, I came across your video on RUclips. I am trying to access the Mysql in my terminal. I am following the process you recommenced and I am getting the below error. Can you please assist me and let me know what to do. I am completely lost and I cannot access the database in my terminal. Please see the below code. I entered my computer password after typing in the sudo code, then it says file exists ( I really don't understand that). Then I type mysql - u root -p and the system says command not found. I am lost.
davidd.christie@Davids-MacBook-Pro ~ % sudo ln -s /usr/local/mysql/bin/mysql /usr/local/bin
Password:
ln: /usr/local/bin: File exists
davidd.christie@Davids-MacBook-Pro ~ % mysql -u root -p
zsh: command not found: mysql
davidd.christie@Davids-MacBook-Pro ~ %
Hi Davidd, use this link and try option 3 that starts with sudo sh -c 'echo
stackoverflow.com/questions/10577374/mysql-command-not-found-in-os-x-10-7
Earnest IT : Hi Earnest IT, thanks for getting back to me. I’ve tried option 3 and that doesn’t work. I really don’t know where to turn or what to do. It’s simply not working.
ln: /usr/local/bin: File exists . THIS IS WHAT I GET after typing "sudo ln..etc" - after that it doesnt ask for any password can you please help
Hi Parita. Please use this path on your terminal window. Just copy and paste it as it is.
ln -s /usr/local/mysql/bin/mysql/bin/mysql /usr/local/bin
Then press CMD inter on your Mac
You should receive an option to inter the password for your computer.
If the mysql bin directory already exist in you environment, you may consider setting the password for that directory using: mysqladmin -u root password Newpassword or try connecting to mysql using: mysql_secure_connection.
If none of this works, then I will presume that the current version of you Mac software may not allow you to install and configure the application or you may not have the necessary admin privileges to install and configure applications in your environment.
I hope this was helpful.
I omitted sudo in my initial response, so, just copy the path below to terminal, then cmd inter:
sudo ln -s /usr/local/mysql/bin/mysql/bin/mysql /usr/local/bin
@@ITVidz Thank you very much I appreciate!! I got it to work!!
@@ITVidz sir i have the same problem and it keeps on saying file exists and im the admin and unique user of my pc . any suggestion? thnx alot
@@midohegazi5986 File exists means you already have the file on your computer. Now, the default MySql installation installs to /usr/local/mysql which is not in your path, specifically the MySql client is installed at /usr/local/mysql/bin/mysql.
You can specify it exactly to launch the client by using this path:
/usr/local/mysql/bin/mysql -u root
I hope this helps.
When I double click the download package, I get this:
"mysql-8-0-20-macos10.15-x86_64.pkg" can't be opened because Apple cannot check it for malicious software. This software needs to be updated. Contact the developer for more information.
I'm using MacOS 10.15.4 on a new iMac
Use the mysql website and follow the video to download the recent software package for mysql.
just go to your package folder mysql-8-0-20-macos10.15-x86_64.pkg and make a right click on it then open it it will work
7:31 it showed me “command not found”
@Soja 2 Me too. Have you solved it?
Solved It: I forgot to link the mysql.exec with my usr/local/bin folder.
Link it via: "sudo ln -s /usr/local/mysql/bin/mysql /usr/local/bin"
@@timderkekskeks4590 Thank you very much
@@timderkekskeks4590 You're the best! Thank you very much!
@@timderkekskeks4590 how did you link it? I am having the same problem
its giving me illegal action when i try to enter my password in terminal
Same issue. Is your issue resolved?
it shows"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
after i try this command mysql -u root -p
Hi Asenk Kwan, your access was denied because you are using either a guest account, probably with or without root privileges. Us this link from stack overflow and try solution 76.
stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw
@@ITVidz okey thanks bro... i try
is he saying My-SEQUEL ?