Installing MySQL Server on Mac OSX
Loading...
2,440
Loading...
Uploader Comments (GlenMacLachlan)
see all
All Comments (18)
-
I actually got the same error as @DEPSiUCF
-
Very clear and straightforward. Thank you :)
-
Hi, I kind of messed up and am getting this message
Saumya-Sinhas-MacBook-Pro:~ saumyasinha$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Help please?
-
@afiimani i got the same thing, what did you do?
-
2:08 - Which profile am I going to add this code to?
-
Do you know how you source a file to create tables on a mac... how you write the path to sql file ?
-
Thanks a lot ... got mysql installed on my mac.... pls post more such useful videos...
-
@Glen Here is my output
>which mysql
>echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:
/usr/local/bin:/usr/texbin:/us r/X11/bin:/usr/local/mysql/bin
Loading...
its showing "Access denied for user ' '@'localhost' to database 'school' // school>> my db name..
please please please help
rayaroun 4 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 4 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 5 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 4 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 4 months ago