Access MySQL database from using require_secure_transport = ON



I follow this tutorial about how to configure SSL/TLS for MySQL.

When I set require_secure_transport = ON in /etc/mysql/my.cnf and create user using

For all IPs,,
mysql > CREATE USER 'shinyuser'@'' IDENTIFIED BY 'password' REQUIRE SSL;

I get this error in shiny logs:

Failed to connect to database: Error: Access denied for user 'shinyuser'@'' (using password: YES)

However, If I don't use REQUIRE SSL and I bind require_secure_transport = ON, I can connect successfully.

So, I have few questions:
1- Is it possible to connect from securely, and if yes ... How?
2- Is it OK to connect from without require_secure_transport = ON, i.e. In a normal way "from a security point of view".

PS: I generate the SSL/TLS certificates and keys using sudo mysql_ssl_rsa_setup --uid=mysql. Also, I can connect from client-server using require_secure_transport = ON and without publishing the public key and certificates to that client-server.

Thanks in advance for your kind help



This question is for and should be asked in channel.

Thanks for reaching out to the team.


@abubaker how are you connecting to your MySQL instance from
Could you share the connection call, with the address, username and password redacted please.


@josh thanks for your reply. Here is my connection call, which I define on top of my Server.R script.


pool <- dbPool(
  drv = RMySQL::MySQL(),
  dbname = "db_name",
  host = "XXX.XXX.XXX.XXX",
  username = 'user_name',
  password = 'password'

onStop(function() {


Have you tried passing the CLIENT_SSL or CLIENT_SECURE_CONNECTION flags when constructing the connection?

And just to clarify a bit, you phrased some of your questions as "connect to", but you are actually trying to attempt to "connect from" to a remote database, correct?


I didn't try passing flags, or actually I wasn't aware that is possible. However, how I can pass flags inside dbPool.
Sorry for mistake, yes I would like to connect from to a remote database in digital ocean.