Cannot connect MySQL Server to Netbeans - mysql

I can't connect to my database using the "new connection" option by right-clicking on Databases in the services tab. I get the following error:
Error Image
Here is information about the server to help with a solution:
Server info
Additional server info
The password I have saved in keychain for the server is "password1" and the connection isn't working even though I entered that.

Ok I finally figured it out. I had to update the MySQL connector driver for Netbeans. I had version "mysql-connector-java-5.1.23-bin" installed and needed to add the new driver "mysql-connector-java-8.0.18.jar" to match the version of MySQL Workbench that I have.

Related

Visual Studio Code mssql extention: SQL Server (mssql) - Unable to connect to server

I'm trying for the first time to get my project to run in Visual Studio Code. This includes a MySQL database. So I've installed the SQL Server (mssql) extension version 1.7.1. I follow the instructions here: https://learn.microsoft.com/en-us/sql/visual-studio-code/sql-server-develop-use-vscode?view=sql-server-ver15
I get to the section "Connect to SQL Server" and enter:
servername: localhost
db name: c3
Authentication type: Integrated
At the end of the section it should connect with the server but instead I get two errors:
mssql: Error "Unable to connect using the connection information
provided. Retry profile creation?"
mssql: Error 2: A network-related or instance-specific error occurred
while establishing a connection to SQL Server. The server was not
found or was not accessible. Verify that the instance name is correct
and that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a
connection to SQL Server)
Does anyone see what is going wrong here?
I've re-installed the extension but with the same result.
A MySQL db and Microsoft SQL Server db are two different things.
It seems that there's no SQL Server installed? You might install the free SQL Server Express Version, create the database in there and then connect from Visual Studio Code.
You have to install the database server yourself as VS Code is just a client. You might also use somekind of hosted offers (many webhosters offer a mysql server with self service installation, or use a cloud based database server). Yout can also use a local database (e.g. SqlLite) which is file based and doesn't need a special installation.
You should do the following
install SQL server in your machine and create Database here
Create a login and a database user here
If you are Using VS code install SQL Server (mssql) open new
connection, follow the prompts to specify the properties for the new
connection profile
If you want to login to your server to make sure of your data
sqlcmd -S localhost -U SA -P '<YourPassword>'

Connecting to MySQL Server with Netbeans

I'm trying to connect with MySQL Server using Netbeans, but once I got an error about denied access for user 'root', another time (when I use the password), Netbeans telling me:
java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long
I'm also using MySQL Workbench, so I know my server is working, but Netbeans can't establish a connection with it.
Versions of programs I'm using:
MySQL Server 8.0
MySQL Workbench 6.3 CE
NetBeans 8.2
Driver files I tried:
5.1.23, 5.1.46, 5.1.45 - provided by NetBeans with names (mysql-connector-java-[version number]-bin.jar
8.0.11 - provided by MySQL with path C:\Program Files (x86)\ Connector J 8.0\mysql-connector-java-8.0.11.jar
OS:
Windows 10 x64
Pics:
without using password (in MySQL Workbench I don't need to use password
with using password
Please check this link, it seems this error appears when you don't have the jdbc driver in the classpath. You have to add the jdbc connector jar to NetBeans by going to the "Services" window, expand "Databases", expand "Drivers" and right-click on "MySQL (Connector/J driver)", choose "Customize" there and click the "Add" button in the dialog, navigate to the jdbc connector and add it, afterwards hit the "Find" button of the "Driver Class" field and then choose the correct class name, hit "Ok" and make another right-click on "MySQL (Connector/J driver)" and choose "Connect Using..." and type in your connection settings.
I hope this helps.

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:

Laragon MySQL ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061 "Unknown Error")

I'm using http://laragon.org for my server
I got a problem yesterday my apps cannot connect to mysql and give me this error message
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost'
(10061 "Unknown Error").
and I tried to run mysql -v but got same error. I'm using :
OS Windows 10 64bit
Laragon v0.7
No antivirus running
No others server running (this is the only server in the pc)
I'm searching everywhere but the answer is to start MySQL service, but I don't find any MySQL service in services.msc (I read on their site if Laragon won't add anything to the System Path Variable.
But, you are freely to use composer, artisan, mysql, mysqldump, httpd, redis-cli, ... in Laragon' shell)
and in their control panel status MySQL 10.0.20 started.. i tried to restart all service and pc but still got the problem
anyone know how to fix this problem ?
UPDATE : mysql -V is working, just need to uppercase -v, but still cannot connect to my MySQL Database
You're running a very old version of Laragon.
Try installing Laragon 0.9 151004, I believe it helps.
From the website, it appears that:
No Windows Services
Laragon manage other servers by its own optimal service manager.
This provides a reason as to why you couldn't find MySQL service in services.msc. Can you check the interface itself (if you can not find the laragon service itself in services.msc) and check whether MySQL service is running or not?
Additionally, look into laragon's installation directory for a logs file. Close and restart laragon if everything fails.

Mysql Workbench connection ssl not enable

I'm trying to connect local database using mysql workbench but i can't connect.i tried test connection.it warned pop up window write "ssl not enable".
how can i connect my local database
this is screen shot
This is just a info popup, telling you, that SSL is not enabled. Just installed Workbench and stubmled over the same message, thinking that indicates a problem :D
Yes, you can of course connect to your DB.