dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
39.44k stars 3.41k forks source link

Buttons [OK] and [Test...] unavailable when host is blank in connection properties #18769

Open de-served opened 1 year ago

de-served commented 1 year ago

Description

If {host} is non mandatory in driver properties, for example, jdbc:mariadb://[{host}]/[{database}] then saving/testing/using connection is impossible.

When it is used? With named pipes on Windows where "host" is useless and can be omitted, urls like "jdbc:mariadb:///", "jdbc:mysql:///" etc. To make using named pipes with that drivers it is absolutely necessary now to duplicate driver then edit url properties and delete {host} or [{host}] if this param was already edited in original driver to skip that bug and ignore what entered in "host address" input in connection.

PS: Yes, hostname can be left here when using named pipes, but it was hard enough to understand which part of url are preventing connection to the pipe, so I've spent enough time trying a lot of url's before something moved from zero point. Connection with mysql-connector .jar driver was successful with "jdbc:mysql:///?socketFactory=com.mysql.cj.protocol.NamedPipeSocketFactory" url, but connection to MariaDB is a big trouble. Can't connect it in any form with mariadb-connector .jar - it is not triggers pipe connection when using any parameters (pipe=MySQL, socket=MySQL, socketpath=MySQL, protocol=pipe, socketFactory=? is unknown to me).

DBeaver Version

22.3.2 (and any previous)

Operating System

Win 10

Database and driver

Any

Steps to reproduce

  1. Create connection.
  2. Delete "localhost" from input
  3. That's all - [OK] and [Test...] buttons disabled

Additional context

No response

LonwoLonwo commented 1 year ago

Hello @desirepl

Please provide any links to the documentation to confirm that the input of the host is not required for MariaDB/MySQL connection.

E1izabeth commented 1 year ago

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-named-pipe.html

de-served commented 1 year ago

Hello @desirepl

Please provide any links to the documentation to confirm that the input of the host is not required for MariaDB/MySQL connection.

Is it actual or E1izabeth answer is enough?

E1izabeth commented 1 year ago

@desirepl The issue will be taken to work, but if you have something to add we will be glad to know.

ricardograca-scratch commented 7 months ago

A very similar thing happens if the Host field has the port number, e.g. localhost:1500, and the Port field is empty.

It's possible to create a connection like this but it's not possible to edit it afterwards, since the Test and OK buttons are not clickable. Connecting to the host still works fine in this case.