@rayaroun This is most likely a simple fix. The error message indicates that the sever is installed but it is not allowing you to access it. That's progress of a sort. When you set up the database did you give the root user a password? If you don't recall don't worry, we can handle either situation. Try this command from the Terminal window:
mysql -u root
and let me know what the response is from your MySQL server.
Sorry for the confusion. What is meant is that if typing mysql from the Terminal gives a command not found error then use your favorite editor and look for the hidden file .profile in your home directory. For example, using nano (a little easier to use than vi) you can do
nano ~/.profile
from the Terminal and then add this line to the bottom of the .profile file:
export PATH=$PATH:/usr/local/mysql/bin
After this, quit all Terminals and relaunch Terminal. Then you can use mysql from the terminal
I installed MySql, got the "command not found error" then used the commands stated without any change in results. Mysql is still not found. Is there another solution?
@afiimani Did you try quitting and restarting Terminal? If that doesn't resolve your problem then try these two commands from a fresh Terminal window and copy and paste the results so I can take a look:
Hi, thanks for the vid! i understand all of what your saying except what is in your annotation. I get the command not found message but can you explain what/where my .profile file is? Where do I add that line of code?
2:08 - Which profile am I going to add this code to?
SebastianNygaard 1 week ago
Do you know how you source a file to create tables on a mac... how you write the path to sql file ?
harsha206128 2 weeks ago
Comment removed
shebotnov 2 months ago
Thanks a lot ... got mysql installed on my mac.... pls post more such useful videos...
puntinthehead 3 months ago
@Glen Here is my output
>which mysql
>echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/local/mysql/bin
afiimani 3 months ago
its showing "Access denied for user ' '@'localhost' to database 'school' // school>> my db name..
please please please help
rayaroun 3 months ago
@rayaroun This is most likely a simple fix. The error message indicates that the sever is installed but it is not allowing you to access it. That's progress of a sort. When you set up the database did you give the root user a password? If you don't recall don't worry, we can handle either situation. Try this command from the Terminal window:
mysql -u root
and let me know what the response is from your MySQL server.
Good luck!
GlenMacLachlan 3 months ago
Sorry for the confusion. What is meant is that if typing mysql from the Terminal gives a command not found error then use your favorite editor and look for the hidden file .profile in your home directory. For example, using nano (a little easier to use than vi) you can do
nano ~/.profile
from the Terminal and then add this line to the bottom of the .profile file:
export PATH=$PATH:/usr/local/mysql/bin
After this, quit all Terminals and relaunch Terminal. Then you can use mysql from the terminal
GlenMacLachlan 4 months ago
Comment removed
afiimani 3 months ago
I installed MySql, got the "command not found error" then used the commands stated without any change in results. Mysql is still not found. Is there another solution?
afiimani 1 sec ago
afiimani 3 months ago
@afiimani Did you try quitting and restarting Terminal? If that doesn't resolve your problem then try these two commands from a fresh Terminal window and copy and paste the results so I can take a look:
which mysql
and
echo $PATH
GlenMacLachlan 3 months ago
Hi, thanks for the vid! i understand all of what your saying except what is in your annotation. I get the command not found message but can you explain what/where my .profile file is? Where do I add that line of code?
Thanks. Si
SimonRochfort 4 months ago
appreciate it...
tlmcqu80 4 months ago
It means I don't need all that PATH commands and etc. So it became simple to install MySQL.
IFoundMyUsername 5 months ago