mysql on mac.

A

Angelo Joseph

I installed my sql on my mac tiger and tried to run it but i keep
getting the error message below and i've looked everywhere but there
seems to be no solution for this can anyone shed any light. ?

angelojoseph:~ angelojoseph$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
angelojoseph:~ angelojoseph$


many thanks,

Angelo Joseph
 
7

7stud --

Angelo said:
I installed my sql on my mac tiger and tried to run it but i keep
getting the error message below and i've looked everywhere but there
seems to be no solution for this can anyone shed any light. ?

angelojoseph:~ angelojoseph$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
angelojoseph:~ angelojoseph$

I used the instructions here:

http://www.benslade.com/projects/java/tomcat/InstallingJavaTomcatMySQLOnMacOSX/

which refer to the mysql installation instructions here:

http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html

which are a little confusing about how to start mysql.


I also used the additional steps here:

http://switch.richard5.net/isp-in-a-box-v2/installing-mysql-on-mac-os-x/


I put /usr/local/mysql/bin in my PATH environment variable(in my
bash_profile file).


1) To start, type:

$ cd /usr/local/mysql
$ sudo ./bin/mysqld_safe
(Enter your password, if necessary)
(Press Control-Z)
$ bg #continue a stopped job in the background--Ctrl+Z stops job?
(Press Control-D or enter "exit" to exit the shell)
To get mysql prompt:
$ mysql -u root

2) To quit mysql prompt, type:

mysql> exit

3) To shut down mysql:

$ sudo mysqladmin shutdown

4) For help, type:

mysql> help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top