dbTalk Databases Forums  

mysql on the mac -- all of a sudden can't connect...

comp.databases.mysql comp.databases.mysql


Discuss mysql on the mac -- all of a sudden can't connect... in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kali
 
Posts: n/a

Default mysql on the mac -- all of a sudden can't connect... - 03-28-2011 , 04:18 PM






last week I installed and successfully set up mysql on mac.. (10.6.6)

was able to connect fine from unix shell and from PHP and JSP.. but
today, just a week later, I can't connect with either PHP or JSP, and
when try to connect from unix shell I get this error:

Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)

what is this please... would appreciate some help...

thank you..

Reply With Quote
  #2  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-28-2011 , 05:03 PM






On 3/28/2011 5:18 PM, kali wrote:
Quote:
last week I installed and successfully set up mysql on mac.. (10.6.6)

was able to connect fine from unix shell and from PHP and JSP.. but
today, just a week later, I can't connect with either PHP or JSP, and
when try to connect from unix shell I get this error:

Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)

what is this please... would appreciate some help...

thank you..
Is your mysql server running?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #3  
Old   
Gordon Burditt
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-28-2011 , 07:27 PM



Quote:
last week I installed and successfully set up mysql on mac.. (10.6.6)

was able to connect fine from unix shell and from PHP and JSP.. but
today, just a week later, I can't connect with either PHP or JSP, and
when try to connect from unix shell I get this error:

Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)

what is this please... would appreciate some help...
Is your MySQL server running? The installation may have started the
server but not set it up to automatically restart on reboot. If
you have rebooted since it last worked, this might be the problem.

Your client and server must *AGREE* on where to put the socket.
Problems like this may occur on the Mac if you end up with two different
MySQL installations and your path is finding the wrong client software.
The solution is either to remove one of the versions, or ensure that
your path finds the correct one first.

Reply With Quote
  #4  
Old   
kali
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-28-2011 , 08:05 PM



On Mar 28, 8:27*pm, gordonb.08... (AT) burditt (DOT) org (Gordon Burditt) wrote:
Quote:
last week I installed and successfully set up mysql on mac.. (10.6.6)

was able to connect fine from unix shell and from PHP and JSP.. but
today, just a week later, I can't connect with either PHP or JSP, and
when try to connect from unix shell I get this error:

Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)

what is this please... would appreciate some help...

Is your MySQL server running? *The installation may have started the
server but not set it up to automatically restart on reboot. *If
you have rebooted since it last worked, this might be the problem.

Your client and server must *AGREE* on where to put the socket.
Problems like this may occur on the Mac if you end up with two different
MySQL installations and your path is finding the wrong client software.
The solution is either to remove one of the versions, or ensure that
your path finds the correct one first.
oh brother.. I just don't remember having had to "turn on" mysql
server in windows (unless I remember wrong...)
how do I turn it on on the mac???

I only have one mysql installation (I think..;-)

thank you....

Reply With Quote
  #5  
Old   
Gordon Burditt
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-28-2011 , 08:45 PM



Quote:
Your client and server must *AGREE* on where to put the socket.
Problems like this may occur on the Mac if you end up with two different
MySQL installations and your path is finding the wrong client software.
The solution is either to remove one of the versions, or ensure that
your path finds the correct one first.

oh brother.. I just don't remember having had to "turn on" mysql
server in windows (unless I remember wrong...)
A *good* mac-specific installer would do this automatically. You
didn't say how it was installed, and if you tell me, I don't know
enough about Macs to describe this, but there's a run-on-boot folder
somewhere.

Did you check whether the server was really not running?

Quote:
how do I turn it on on the mac???

I only have one mysql installation (I think..;-)
I think some Macs have managed to actually come with MySQL preinstalled,
or it gets installed with some other app that doesn't necessarily
tell you what it's installing.

Reply With Quote
  #6  
Old   
kali
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-28-2011 , 10:36 PM



On Mar 28, 9:45*pm, gordonb.x7... (AT) burditt (DOT) org (Gordon Burditt) wrote:
Quote:
Your client and server must *AGREE* on where to put the socket.
Problems like this may occur on the Mac if you end up with two different
MySQL installations and your path is finding the wrong client software..
The solution is either to remove one of the versions, or ensure that
your path finds the correct one first.

oh brother.. *I just don't remember having had to "turn on" mysql
server in windows (unless I remember wrong...)

A *good* mac-specific installer would do this automatically. *You
didn't say how it was installed, and if you tell me, I don't know
enough about Macs to describe this, but there's a run-on-boot folder
somewhere.

Did you check whether the server was really not running?
how do I check? to install followed instr's here,
http://techxplorer.com/2011/03/03/in...l-on-mac-os-x/


Quote:
how do I turn it on on the mac???

I only have one mysql installation (I think..;-)

I think some Macs have managed to actually come with MySQL preinstalled,
or it gets installed with some other app that doesn't necessarily
tell you what it's installing.
now THAT's clever.....;-)

at any rate installed "stand-alone" mysql b/c need to be able to
connect both from JSP/Tomcat and PHP. no sense in having more than
one instance of it, is there now? (I hope I don't have more
installed.. but at any rate, this one worked fine the first day I
intsalled it.. )

thank you..

Reply With Quote
  #7  
Old   
Gordon Burditt
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-29-2011 , 01:31 AM



Quote:
Did you check whether the server was really not running?

how do I check? to install followed instr's here,
http://techxplorer.com/2011/03/03/in...l-on-mac-os-x/
On that page, did you do the "Step 3" part about installing the
startup item? Note that this page has been edited since it was first
posted, specifically about the startup item.

Since it's a UNIX-like kernel, the "ps" command would be appropriate
here. You'd need to look at background tasks. Something like:
ps axww | grep mysqld
should list the server process if it's running.


Quote:
how do I turn it on on the mac???

I only have one mysql installation (I think..;-)

I think some Macs have managed to actually come with MySQL preinstalled,
or it gets installed with some other app that doesn't necessarily
tell you what it's installing.

now THAT's clever.....;-)

at any rate installed "stand-alone" mysql b/c need to be able to
connect both from JSP/Tomcat and PHP. no sense in having more than
one instance of it, is there now? (I hope I don't have more
installed.. but at any rate, this one worked fine the first day I
intsalled it.. )
Working fine initially, then not working after a reboot, is a sign
that auto-start of the server is not configured, or is failing.

There might be reasons to install more than one version, but they
are fairly unusual. Migration testing. Testing out replication
when you don't really have two machines. Setting up a "test" and
"production" database (which really ought to be on separate machines).
Keeping different competing customer data separate when you (or
they) are REALLY, REALLY paranoid (using separate databases ought
to be enough, and if it's not, use separate machines in separate
buildings, or maybe separate countries).

If you have MySQL installed, it should talk to clients for more than
one application fine (although there is the issue of creating appropriate
logins, you'll at least be able to connect). You will probably use
separate databases for separate applications.

Reply With Quote
  #8  
Old   
Bodo
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-29-2011 , 08:52 AM



Hi,

to start mysql by hand and to check wether it is running use the seperate to install MySQL System
extension.

See http://superuser.com/questions/18970...ver-on-startup for a picture.

Beware, there was a bug in the startup scripts, maybe OK in 5.5.9 or greater

See for example: http://softwareblog.morlok.net/2011/...5-5-8-on-os-x/

Also see MySQLWorkbench for easy administration of MySQL:
http://dev.mysql.com/downloads/workbench/5.2.html

Cheers,

Bodo

Reply With Quote
  #9  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-29-2011 , 12:12 PM



On Mar 28, 3:18*pm, kali <maya778... (AT) yahoo (DOT) com> wrote:
Quote:
last week I installed and successfully set up mysql on mac.. (10.6.6)

was able to connect fine from unix shell and from PHP and JSP.. but
today, just a week later, I can't connect with either PHP or JSP, and
when try to connect from unix shell I get this error:

Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)

what is this please... would appreciate some help...

thank you..
When you install mysql for the first time there are two packages that
get installed..
1) is the server
2) the other is the autostartup.
The auto startup adds an mySQL icon to the system prefrences
pain... from there you can start or stop the server.

Reply With Quote
  #10  
Old   
kali
 
Posts: n/a

Default Re: mysql on the mac -- all of a sudden can't connect... - 03-29-2011 , 06:46 PM



On Mar 29, 2:31*am, gordonb.ax... (AT) burditt (DOT) org (Gordon Burditt) wrote:
Quote:
Did you check whether the server was really not running?

how do I check? *to install followed instr's here,
http://techxplorer.com/2011/03/03/in...l-on-mac-os-x/

On that page, did you do the "Step 3" part about installing the
startup item? *Note that this page has been edited since it was first
posted, specifically about the startup item.
oh man, what a moron I am.. ok, saw that to turn on have to do thru
apple logo -> system settings.. I guess I had forgotten this step b/c
I never had to do this in windows (that I remember... how DO you turn
mysql server on in windows?? how fast one forgets....;-) this is my
first time doing all this stuff on the mac... for years before now had
done all this stuff on windows only... thank you....

Quote:
Working fine initially, then not working after a reboot, is a sign
that auto-start of the server is not configured, or is failing.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.