Spring cloud dataflow not connecting to MySQL DB - mysql

I am trying to run my spring-dataflow-server-local with MySQL DB. But it says,
" java.sql.SQLInvalidAuthorizationSpecException: Access denied for user ''#'localhost' (using password: NO) "
I am running on my Windows Machine.
I used the same user name and password to connect to the same mysql from MySQL Workbench successfully.
I am running the dataflow server with the following command.
java -jar spring-cloud-dataflow-server-local-1.7.4.RELEASE.jar --spring.datasource.url=jdbc:mysql://127.0.0.1:3306/task_db --spring.datasource.username=username --spring.datasource.password=password --spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
Please help me on how to fix this? anyone faced similar issues?

I have tested that the data flow server starts successfully using
Windows 10
MySQL 8.0.15
Java 1.8.0_66
With the same command line that you show. I used jdbc:mysql:localhost:3306/task_db and created the task_db schema before running the data flow server in the workbench.
When installing MySQL 8.0.15 there was an option for 'enhanced login security' or 'classic' security. I picked 'classic'.
Would need to know more of how your MySQL is set up.
To isolate things, try going through the getting started guide - there is a 'completed' folder you can just run - https://spring.io/guides/gs/accessing-data-mysql/ and see if you have any connection issues.

Related

Pentaho connecting to MySQL database

I am working on Pentaho Data Integration tool version 7.1. I am trying to connect to a database using 'Table Input' step. but when I test the connection in this step in Pentaho it is giving me the below error message. I am able to connect to DB using the MySQL workbench (MySQL is 5.7). I have placed the 'mysql-connector-java-5.1.23-bin.jar' file in the lib folder. My Java is 1.8.0-131; I am using Windows 10.
Error connecting to database [mydb] :org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
Error connecting to database: (using class org.gjt.mm.mysql.Driver)
Unknown database 'mydb'
Make sure your pentaho version supports mysql connector .if it is not, download the required version and paste -> extract the file and paste it in the
\pdi-ce-8.2.0.0-342\data-integration\lib
After that open spoon.bat goto menu ->tool->marketplace ->install
mysql plugin
Restart pentaho after installing mysql plugin.
then try connecting to mysql .Hope it will solve your issue
It looks like the JDBC does not find your database. It may come from a typing mistake in the name, password, that the user has not enough grant,...
To debug use the test button on the bottom of the new connection button:

SQlite to MySQL migration for Seafile Server

I have successfully got Seafile Server fully working with HTTPS.
However I'm trying to migrate from SQLite to MySQL and everytime I try, the seafile server stops working.
I'm not sure what information to put here that yous will need but happy to provide what ever you need.
I followed this guide Deploy Seafile Windows Server With MySQL
Its really frustrating, I dont understand why its not working. I also installed MySQL Workbench and I can see the seafile user with privileges and the databases populated with the tables.
Are there any messages in the logs?
Please look at the logs in /seafile/logs/
You will see an error message in seafile.log if you have problems with MySQL.
For example:
../common/seaf-db.c(123): Failed to get database connection:
Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (107).
http-server.c(761): DB error when check repo existence.
Disconnected from daemon
I have done such migration already and it did work without problems.

Cannot connect to MySQL Server database at localhost:3306

When I first set up MySQL Server in Netbeans everything worked well. Now one day I think I accidentally clicked something or my computer lost battery life when I was connected to MySQL Server, and after these event(s) I have not been able to connect to MySQL Server. I do not know for sure if either of the above events would have any effect on connecting to a MySQL Server database.
Anyway since these events I have found that I cannot "start" or "connect" to a MySQL Server databse. I am doing this all through Netbeans IDE.
Here is a picture of how I try to connect to my databaseL:
This is what the error message says after I click connect:
Unable to connect. Cannot establish a connection to jdbc:mysql://localhost:3306/twitterdata using com.mysql.jdbc.Driver(Unknown database 'twitterdata'). The name of the database I am trying to connect to is twitterdata
How can I get reconnected to the MySQL Server database "twitterdata"?
I am not familiar with MySQL, databases, servers and I have no idea how to get reconnected. If there is any other helpful information that I should provide let me know.
What MySQL tools can I run to find my problem?
Why would the error message tell me that the database is unknown?
If I got to C:\ProgramData\MySQL\MySQL Server 5.5\data. There is a folder named twitterdata.
Here are the contents of that directory:
Please let me know if you need more information or if you have other suggestions that would help!
Thanks for all the help!
If you are using windows system and facing the error 'unable to connect localhost 3306' at the connection time. First you have to need start MySQL services in 2 steps:
Press "Windows key + R" write "services.msc"
And run as admin start MySQL service.
There can be three issues:
1) Either your server isn't even running. Open your command prompt and enter mysql
2)Let's say it is , can you check if it's connecting on the correct port.
Like in the url, you are using 3306,
Try following this post:
How do I find out my MySQL URL, host, port and username?
3) Can you check what if there are any credentials to the database you are connecting?
https://netbeans.org/kb/docs/ide/install-and-configure-mysql-server.html

Jasperserver installation unable to access database

I am trying to install jasperserver(war) in a CentOS linux machine. It throws up error saying,
Message: [Access denied for user 'jasperdb'#'xx.xx.xx.xx' to database 'mysql']
However, when I access mysql via command prompt it works fine. I am able to access via the user jasperdb from same machine where I am trying to install jasperserver.
It is also weird why jasperserver tries to access the database with name 'mysql'? Any solutions?
The mysql database within mysql is the one where user info is stored. That is why it is trying to access the mysql database. I am assuming you have 'jasperdb'#'localhost' in your mysql.user table. Try making sure that localhost and any other computer names are in your /etc/hosts filled in for 127.0.0.1.
If you are not using the ".war file" installer, I recommend using that. It's a lot easier to troubleshoot than the installer that bundles in Tomcat and PostgreSQL.
If you are using that, then you should find the credentials that you have set in default_master.properties. That includes both the user name and the database name. Run ant clean-config to make sure you aren't picking up any old settings.

Connecting Funambol to MySQL on remote host

I am setting up Funambol 8.7 on a Linux host (using Amazon AWS). I need to connect to a MySQL datbase that is hosted on a different server.
Per the administration guide I went ahead and downloaded the mysql connector and placed the jar in /opt/Funambol/tools/jre-1.6.0/lib/ext. I changed the install.properties file as follows:
dbms=mysql
jdbc.classpath=/opt/Funambol/tools/jre-1.6.0/jre/lib/ext/mysql-connector-java-5.1.14-bin.jar
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://myserver.net/rugcutte_funambol?characterEncoding=UTF-8
jdbc.user=rugcutte_funambo
jdbc.password=funambol
THen I try to run the install, but get the following error:
/opt/Funambol/ds-server/install/install.xml:452: java.sql.SQLException: Access denied for user 'rugcutte_funambo'#'ec2-50-16-233-200.compute-1.amazonaws.com' (using password: YES)
It appears my AWS instance can connect successfully to my MySQL database however it is trying to login with a fully qualified user name that is incorrect: rugcutte_funambo'#'ec2-50-16-233-200.compute-1.amazonaws.com
I tried also to change the line to : jdbc.user=rugcutte_funambo#myserver.net . But I got a similar error with that as well.
I am relatively inexperienced to JDBC. What is the proper way to set up this section of the install.properties file?
Did you enable access to that database with that user from that server?
What happens if you try and just make the same mysql connection from the command line from your Funambol server?
Thanks Adam.
You led me to the correct answer. The remote host has an area in cPanel to configure Remote Database Access Hosts. So I did, need to add my source host that is running Funambol, to my list of access hosts.
After this I ran the install and it did, appear to create the tables properly in the database running on my remote host.