MySQL & NetBeans Integration issue - mysql

I am trying to get MySQL and NetBeans to work together but I am getting a very weird behavior. When I installed MySQL I gave it a password and noticed it had a database called "test". I created a table in it and ran successful queries against it.
Then I rebooted my Windows 7 machine, opened up NetBeans and tried to connect to the database using the stored password. Connection failed. However connecting with a blank password succeeds, but the "test" database is now gone!!
I had a previous version of MySQL, but uninstalled it and removed all folders I could find with mysql in it.
I installed NetBeans EE from scratch.
Installed MySQL server only and gave root a non-blank password.
Connected to it using pwd from above and used NetBeans tools to add table to "test" database (which was there by default). Note this was done during the same computer log-in session.
Did nothing else but rebooted the machine and tried to connect to MySQL from NetBeans and got password error. Connecting with blank password works, but "test" db (along with my table) is now gone.
I suspect the "test" db may have to do with temporary files/setup, but I am not sure and I really don't understand the password issue...
Any help greatly appreciated.

Try another program to test the connection to the database. (to isolate the problem MySQL/NB)

Related

Spring cloud dataflow not connecting to MySQL DB

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.

Cannot connect - invalid settings

I'm using windows 10 & am having all kinds of trouble with Xampp/MySql/PhpMyAdmin, problems which I did not get on Windows 7.
So basically I made a Laravel website at work where I still use windows 7, so the password for the MySQL database works fine there.
However when I try to login on my website at home (windows 10) I get the 'using password NO' error... So to rectify this error I used the Xampp shell and executed this command: mysqladmin --user=root password "newpassword" which then allowed me to use any database dependent functions on my website that previously did not work, but now when I try to get onto localhost/phpmyadmin I am getting the error 'Cannot connect - invalid settings'.
So in summary it's either I can
A. get on phpmyadmin fine but none of the database dependent features of my Laravel site work.
B. The database features all work but I can't access phpmyadmin anymore.
Can anyone advise on how I can get both things to work?!
So you're using two machines, correct?
Then it will be your configuration that's different from the other.
Reinstall it on the Windows 10 machine and replicate what you've done on the other machine (copy the xampp files over like the php.ini and any other configuration file).

MySQL Workbench 6.0 and Windows 8 - Failed to connect to MySql at localhost?

I am simply lost as to where this problem is originating from or why the Workbench is acting the way it is. My system is Windows 8 running MySQL Workbench 6.0. I setup new connection and the user is root, host is localhost and connection method - standard TCP/IP. Everything else is left as it is. I click on Test connection button and I get Failed to connect to MySQL at localhost:3306 with user root Even if I ignore that error and simply create the connection by click on OK button, it asks for password when I click on the connection to open the connection. I even uninstalled and re-installed Workbench as many has suggested in Stackoverflow and other websites. My server is running (mysql.exe).
What's weird is that on Windows 7, Workbench doesn't have any problem. Test connection work as expected.
I solved my issue. I simply uninstalled MySQL from my system. Then, I reinstalled MySQL through Windows Platform Installer. Also, re-installed MySQL Workbench. That was it. Now, my PHP files are able to talk to the database without any problem. Plus, MySQL workbench as well working as expected.

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.

MySQL Workbench: "Can't connect to MySQL server on 127.0.0.1' (10061)" error

I apologise.. I know this question has been asked many times before, but I've tried lots of suggestions, and simply can't find a solution.
The problem: I have a MySQL database running on a hosted server.
I have to use SSH to connect to it, and I have the relevant Public and Private Key files.
I specifically want to use the PC version of MySQL Workbench, to access this database, for running queries, checking data, etc.
If I run Sequel Pro on a Mac, it connects fine, and I can browse and query the database. No problems.
If I run the trial version of SQLyog on a PC, it also connects fine. No problems.
But if I try to connect use MySQL's own "MySQL Workbench" application, using exactly the same settings and SSH Private Key file, it refuses to connect, throwing the well-known error:
Can't connect to MySQL server on 127.0.0.1' (10061)
I find it frustrating, as, in SQL Workbench, I specified the "MySQL Hostname" to use, db01.mysql.vm.MyHostingServer.net, but Workbench seems to ignore it, and demand to connect to 127.0.0.1 instead.
(I have read that Workbench says it needs the Public key file, but actually means the Private key file... and I have tried with both. I've also tried with MySQL Workbench on a Mac, but that crashed all over the place, simply when I was typing in server names and passwords.. it was a mess !!)
The hosting service I've gone with gives me limited permissions for changing MySQL settings, and given that Sequel Pro and SQLyog can connect successfully, I don't want to start messing about and changing things randomly.
Any ideas...?
Maybe you are not allowed to start the service "MySQL 55". Set the login information of Service "MySQL 55" as local!
To see the list of aviable services in Windows 7:
Open a run box
Type services.msc and press return.
Find the service MySQL55
A right click of the MySQL55 Local Service shows Properties -> Log On
Even I had same problem, The reason was mysql service was not getting configured properly, when I installed it through 'MySQL installer'. Also it was not starting, when I tried to start the service manually.
So in my case it seemed be a Bug with the 'MySQL Installer', as editing the install path to a different one when the 'Developer default' was selected, the problem occurs.
Solution (Not exactly a solution):
Uninstalled the MySQL all products (completely)
Reinstalled, this time also I have selected 'Developer default', but didn't make any changes to the path or any thing. So the path was just 'C:\Program Files\MySQL' (the default one)
And just clicked Next Next...
Done, this time MySql was running fine.
After making above improvement such as checking if mysql service is running or not, you just need to give a small password while creating connection, it is ' ' or 1 time press on space-bar in case of GUI or workbench. After which you just need to validate your machine with server (validated HOST). For that purpose click on 'New Server Instance' and it will configure server/HOST on your behalf itself.
I have done this successfully just a few couple of minutes ago. My workbench software is able to show all pre-installed databases etc now.
hope it will work for you as well.
Thanks!!!
I was having same issue, way i have resolved is:
opened the MySQL installer. i was having a Reconfigure link on MYSQL Server row.
Clicked on it, it does reinstalled MySQL Server.
after that opened MySQL Workbench, and it was working fine.
Try placing the host name (db01.mysql.vm.MyHostingServer.net) in your windows host (C:\windows\system32\drivers\etc\host) file along with it's IP address and port number and see if that helps.
If you have installed WAMP on your machine, please make sure that it is running. Do not EXIT the WAMP from tray menu since it will stop the MySQL Server.
To connect to a new server, you click on home + add new connection. Put IP or webserver URL in new connection.
Just try to run the following command manually:
C:\wamp\bin\mysql\mysql5.6.17\bin\mysqld.exe --console
It worked for me :)
Ran into the exact same problem as OP and found that leaving the "MySQL Server Port" empty in the MySQL Workbench connection solves the issue.
I have tried all the method.
I will suggest you to reinstall it.