Softaculous


Topic : mysql.sock


Posted By: Vulcanus on November 18, 2012, 3:01 pm
Hi
I use AMPPS 1.9 for OS X 10.8.2 Mountain Lion end I've install Drush for my Drupal site.
The installs are OK, but when i test Drush with the command drush status I receive this error:

PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) environment.inc:517

The system doesn't found mysql.sock ?

After internet research I found this command

Code
sudo ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /tmp/mysql.sock


but I don't have the file mysql.sock in /Applications/AMPPS/mysql/tmp/mysql.sock .

Why? What can I do?

Can you help me?

bye
Thanks

Posted By: tidus on November 19, 2012, 6:58 am | Post: 1
Hi,

There can be three possible reasons that mysql.sock is not available at that location :

1. MySQL is not running.
2. You have two MySQL on your machine, and other MySQL is running instead of AMPPS MySQL.
3. /Applications/AMPPS/mysql/tmp folder does not exist.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: Vulcanus on November 19, 2012, 6:32 pm | Post: 2
Hi,
this is what i found:

1-MySQL is running in fact AMPPS and the sites running correctly
2-I don't now:
on internet i found this code
Code
ps aux | grep mysqld
to put into the terminal and i received following output

Code
MyUsername          1210  0,0  0,3  854208  37388  ??  S    7:18pm  0:00.28 /Applications/AMPPS/mysql/bin/mysqld
MyUsername          1258  0,0  0,0  2432768    620 s000  R+    7:26pm  0:00.00 grep mysqld

3-/Applications/AMPPS/mysql/tmp folder  exists

What do I have to do?

Thanks

Posted By: tidus on November 20, 2012, 5:56 am | Post: 3
Hi,

Can you open a ticket ?

We will look into it.

http://www.ampps.com/support

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: Vulcanus on November 20, 2012, 6:48 am | Post: 4
Ok  l will open the ticket, but now I must go to work.
I have the time zone problem (I'm italian).

However the same problem I have it also on another computer (other Mac OSX 10.8.2).

Can be a problem of compatibility?

Thanks

bye

Posted By: tidus on November 21, 2012, 5:16 am | Post: 5
Hi,

We we were able to generate this issue. Will let you know the solution asap.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: Vulcanus on November 27, 2012, 4:58 pm | Post: 6
Any news?

thanks
bye

Posted By: tidus on November 28, 2012, 6:56 am | Post: 7
Hi,

The file is present. Its a socket file. Its just not shown in the Finder.

Code
Jigars-Mac:~ jigar$ ls -lha /Applications/AMPPS/mysql/tmp/mysql.sock
srwxrwxrwx  1 jigar  admin    0B Nov 28 12:19 /Applications/AMPPS/mysql/tmp/mysql.sock
Jigars-Mac:~ jigar$ file /Applications/AMPPS/mysql/tmp/mysql.sock
/Applications/AMPPS/mysql/tmp/mysql.sock: socket
Jigars-Mac:~ jigar$ type /Applications/AMPPS/mysql/tmp/mysql.sock
/Applications/AMPPS/mysql/tmp/mysql.sock is /Applications/AMPPS/mysql/tmp/mysql.sock
Jigars-Mac:~ jigar$ sudo ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /var/mysql/mysql.sock



-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: Vulcanus on November 29, 2012, 1:55 pm | Post: 8
Ok,
but why I receive with the command "Drush status"

WARNING
PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) environment.inc:517


the same thing happens on my iMac and on my MacBook.

I also tried your commands and they are all ok except the last one:

if I do "sudo ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /var/mysql/mysql.sock" , I receive "ln: /var/mysql/mysql.sock: No such file or directory"

What should I do?

Thanks

Posted By: tidus on November 29, 2012, 3:50 pm | Post: 9
Quote From : Vulcanus November 29, 2012, 1:55 pm
Ok,
but why I receive with the command "Drush status"

WARNING
PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) environment.inc:517


the same thing happens on my iMac and on my MacBook.

I also tried your commands and they are all ok except the last one:

if I do "sudo ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /var/mysql/mysql.sock" , I receive "ln: /var/mysql/mysql.sock: No such file or directory"

What should I do?

Thanks


Hi,

Type :
Code
$ mkdir /var/mysql
$ sudo ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /var/mysql/mysql.sock


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: Vulcanus on November 29, 2012, 6:44 pm | Post: 10
GREAT !!! Yeah, now it's all right.

Thank you very much !!!!

bye

Posted By: webbermusic on July 9, 2014, 10:28 pm | Post: 11
It still did not work for me until I changed the host from  "localhost" to "127.0.0.1"

https://www.drupal.org/node/1428638%20for%20details

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.