I have locally installed and run the latest version of Oracle MySQL Community Server 8.0 on port 3306. I successfully established connections to it from locally installed Oracle MySQL Workbench 8.0 Community Edition (screenshot) and from DBeaver 21.2.
I wish to connect to it from Mathematica taking the advantage of the External Language Input and RelationalDatabase functionality.
Here is my attempt:
refMySQL =
DatabaseReference[{"Backend" -> "mysql", "Port" -> 3306, "Host" -> "localhost",
"Username" -> "admin", "Password" -> "admin", "Name" -> "sys"}];
DatabaseConnect@refMySQL
The error description is: "Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python".
Evaluating RelationalDatabase@refMySQL or StartExternalSession@refMySQL produces the same Failure message.
I also tried changing "Backend" to "oracle" and "Username" to "root" with the same result.
How to connect to the database?
I have installed and configured Python 3.9.7, which works well from Mathematica:
(Update: after upgrading to Mathematica 13.1.0 the problem persists.)


DatabaseReference[<|"Backend"->"mysql","Port"->3306,"Host"->"localhost","Username"->"admin","Password"->"admin","Name"->"sys"|>]I get the same error. $\endgroup$"DatabaseLink`". Do you have a ready-made configuration for local MySQL 8.0? $\endgroup$