Mysql on ubuntu data source setup issue

i just installed mysql for ubuntu and created a test db, however, setting up a data source via lucee failed.
err msg:

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."

Here are some key info:

verification: show global variables like ‘port’;
indicates that mysql is running at port 3306.

What could be wrong?

Hi, have you checked your firewall settings? What happens when you try to connect with another mysql client from the same machine? Are you able to connect to it?

1 Like

Yeah, sql client access to the mysql server and databases on it was fine.
Any test that I can run to verify it’s firewall issue?

It really can be a lot of things. If it isn’t the firewall, maybe your mysqld is bound to an ip-address within the my.cnf? And the datasource you are creating inside lucess server administrator is trying to connect to your external IP-Address? To check open a terminal and do a:

sudo ss -ltnp|grep mysql.

What response do you see?
or your
externalIP:3306 ?

1 Like

This is what is returned:

LISTEN 0 80 : users:((“mysqld”,pid=18294,fd=20))

In addition, my current mysql configuration seems empty, both the my.cnf and mysql.cnf file under /etc/mysql directory has the following content in addition to multiple lines of comments:

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

These two directories seem to have been excluded. In the meantime, the /etc/mysql/mysql.conf.d/ directory seems to have a meaningful configuration file such as

bind-address =

For the data source setup, I tried “localhost” and “” respectively for “host/server” to no avail.
What else could I try?

Do you have lucee running on a different machine than your mysql server?

Also… when you are setting up the datasource are you connecting to “localhost” or to a specific IP-Address that is not

You can try changing that to:
bind-address =
resttart mysql

BUT WATCH OUT: By doing this you will probably open mysql over the internet for everybody if you don’t set up a proper firewall rule.

I am running Ubuntu 18.04 LTS in a couple of places, MySQL 8, Lucee 5.x.x.x and over Tomcat and Apache. If any of my settings can help, I am happy to share.

Also, if you running Tomcat, make sure that you give the WEB-INF folder to tomcat (chown -R tomcat:tomcat).

I’ve also included a MySQL 8.0.18 driver which I recently put together with a lot of help from other people here. You are welcome to use (add through Lucee admin). This community has been very helpful, if I can give back, happy to.

com.mysql.cj-8.0.16.lex (2.1 MB)

bind-address =
resttart mysql

done to no effect, ds setup still failed with same err msg.

how do I know which configuration file is being used? Thanks.

I’d prefer to keep it as simple as possible, that is, just Lucee and mysql ( 5.7.28-0ubuntu0.16.04.2 ),

It is too dificult to predict this from remote.

I did a fresh install with ubuntu 18.04 LTS, latest stable Lucee with Linux Installer and MariaDB (actual default MariaDB Version), without any issue.

Further reading for your problem you may find here:

1 Like

I appreciate the info. Is it easy to upgrade my current Lucee version on ubuntu 16.04 to its latest stable version?

I really can’t say, because I am totally new to linux. I come from windows and I am learing about Linux/Ubuntu thankfully/gratefully motivated by some users of this forum. I still didn’t get to this point because I am still on phase of experimenting/hardening/finding the best configuration that works for me on a VPS. But upgrading is on my checklist just like desasterrecovery & backup. But I think that is not very different than on windows because its JAVA: it should only be a backup and a jar-file replacement.

1 Like


1 Like

Ok, thanks for the note.

I appreciate the lucee upgrade info.

@andreas I have several questions about MariaDB.

  1. I have never used MariaDB but I consider myself reasonably good at relational dbms. Found the following info about it.
    MariaDB Server is one of the most popular open source relational databases. It’s made by the original developers of MySQL and guaranteed to stay open source. **
  2. We have a centOS Linux version 7 box. Would the latest Lucee docker image have a driver for MariaDB for this OS?
  3. If the above 2) is true, in the future if we need to export MariaDB to other dbms such as MS SQL Server, would that be doable? If so, how easy or how difficult it might be?

Many thanks.


MariaDB is a fork of MySQL and was built by the creators of MySQL before selling it to Sun Microsystems. It was built to ensue a drop-in replacement capability with MySQL (comparable with Lucee/Railo in relation to Adobe CF). When I switched in 2012 it was pretty easy, because everything worked all alike. At that time I felt like I was using MySQL, but with a different name. Not only the engines are alike, also the config files/directives, SQL, use of HeidiSQL worked all the same. You can export import DBases with mysqldump from one to the other. So the drivers you use are the mysql-drivers. Switching to MS SQL should be pretty the same like switching from MySQL.

If you experiencing problems with MySQL you’ll probably have the same issues with MariaDB. especially when you are using old software/drivers. Better check that first.

1 Like