Reputation: 4972
I am trying to connect to my local phpmyadmin database using the following url:
jdbc:mysql://127.0.0.1/phpmyadmin/db_structure.php?server=1&db=mydb_name
And using the mysql-connector-java-5.1.48-bin.jar
connector after reading this post saying that changing the connector version from 8
to 5.1.48
solved his problem.
I've downloaded the connector and saved it into nifi1.10
lib directory and pointed the driver to its url:
file:///Users/myuser/Desktop/nifi-1.10.0-bin/nifi-1.10.0/lib/mysql-connector-java-5.1.48-bin.jar
At the Nifi, I've created a new processor having QueryDatabaseTableRecord
as main role and added the previous info to its properties:
AND the controller set as MySQL:
The final architecture is like so:
I am getting the following error:
cannot create PoolableConnectionFactory (Unknown database phpmyadmin/db_structure.php)
Note that the wamp server is already running. Is it because of the url ? Because it is working when I paste it into the browser and it took me directly into the related database
Upvotes: 0
Views: 536
Reputation: 28564
Read how to build jdbc url
https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-jdbc-url-format.html
You have the error unknown database ...
Means that you specified database name incorrectly.
Instead of
jdbc:mysql://127.0.0.1/phpmyadmin/db_structure.php?server=1&db=mydb_name
Use
jdbc:mysql://127.0.0.1/mydb_name
Check that mydb_name
is a valid database name.
Upvotes: 1