MySQL 5.6.26 can lucee connect to Localhost via UNIX socket

Skip to first unread message

Birgit Pauli-Haack

Aug 2, 2015, 2:00:24 PM8/2/15
to Lucee
HI there, 

I am bit in a bind, and don't known how to troubleshoot it. 
I installed MySQL via dmg defaults on MAC OS X 10.10.4
Lucee is running on tomcat-8.0.24

Now I need to create a datasource in Lucee to a db on mysql and it seem that local host connnection only works via TCP/IP 
But it seem mysql is only allowing only a connection via UNIX socket

In  Lucee server admin I get this message: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

When I try to connect MySQL Workbench to the server via Standard (TCP/IP) - I get also an error 
See scree shot.

I successfully connect the work bench via "Local Socket/Pipe" 

on command line mysql > status give me this read out: 

Connection id: 23

Current database:

Current user: root@localhost

SSL: Not in use

Current pager: stdout

Using outfile: ''

Using delimiter: ;

Server version: 5.6.26 MySQL Community Server (GPL)

Protocol version: 10

Connection: Localhost via UNIX socket

Server characterset: latin1

Db     characterset: latin1

Client characterset: utf8

Conn.  characterset: utf8

UNIX socket: /tmp/mysql.sock

Uptime: 57 sec


I did a lot of reading but some how, I can't find either how to change MySQL configuration to accept TCP/IP connection or get Lucee to connect via UNIX socket. 

Any help would be appreciated.


Kai Koenig

Aug 2, 2015, 2:28:08 PM8/2/15
Random idea: Mac OSX firewall blocking 3306?


See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW -
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

Jon Clausen

Aug 2, 2015, 2:38:00 PM8/2/15

You likely need to enable TCP/IP connections in your my.cnf file or startup MySQL without the —skip-networking option (make sure it’s also commented out in the [mysqld] section of your my.cnf:

#adjust the config in this block:
#leave the other config options above this alone

bind-address    =
# skip-networking

You will also need to grant privileges in your user table to that database:

# mysql -uroot -pmypassword
USE mysql;
GRANT ALL ON [dbname] TO 'myuser'@'localhost';

Jon Clausen

Aug 2, 2015, 2:46:02 PM8/2/15

Oops. Sorry for the typo below. That should be:

bind-address    =

You can use to bind to all interfaces, but I wouldn’t recommend it.

You might need to explicitly specify the IP in your GRANT statement as well if your loopback doesn’t resolve localhost correctly (Airport on OS X can have some weirdness with the loopback when not connected to WiFi):

USE mysql;
GRANT ALL ON [dbname] TO 'myuser'@'';

You can use the ‘%’ option instead of the IP in your grant statement to allow from all interfaces but, again, I wouldn’t recommend it.

Birgit Pauli-Haack

Aug 2, 2015, 4:16:10 PM8/2/15
to Lucee
Appreciate jumping this so fast. Thanks

But it's still a not go... 

the my.cnf file is location under /usr/local/mysql/my.cnf

looks now like this: 
# For advice on how to change settings please see


# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
port = 3306
# server_id = .....
# socket = .....
bind-address =

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 


But now mysql doesn't start any more

Birgits-MacBook-Pro:mysql birgit$ sudo -u root /usr/local/mysql/support-files/mysql.server restart

 ERROR! MySQL server PID file could not be found!

Starting MySQL

.................................................................................................... ERROR! The server quit without updating PID file (/usr/local/mysql/data/

Birgits-MacBook-Pro:mysql birgit$ 

Some how this is jinx... I need to walk away for now.. 

If you have some other ideas, I'd appreciate it. 


Jon Clausen

Aug 2, 2015, 6:15:43 PM8/2/15

There are so many ways to install MySQL on OSX so your binary may be different, but if you installed it with Homebrew, the startup binary used by homebrew is located at /usr/local/opt/mysql/bin/mysqld_safe

You can also start/stop/restart by loading and unloading the .plist file :

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist\
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

Birgit Pauli-Haack

Aug 2, 2015, 11:22:30 PM8/2/15
Hi Jon, 

I decided to uninstall MySQL for now and let it sit for now. I'll take another stab at it again tomorrow. 

Kai, yet, that was a good thought regarding Firewall, but I switch the firewall off during testing of this issue. 

Thanks for all your suggestions. I really appreciate it. I'll report back on my next round of it. 


Birgit Pauli-Haack
Web & Mobile Developer / Project Manager
m:239-595-3882 | | a:Naples, Florida
Get a signature like this: Click here!

Reply all
Reply to author
0 new messages