MySQL-Workbench Connection Fail - mysql-workbench

Try to ask a question because the DB connection in MySQL Workbench continues to fail.
Enter connection information and Test Connection was successful.
However if i select the appropriate DB Connection in workbench home, the connection success window does not appear.
local DB : mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Win64 (AMD64), source revision ab7b9cf9122f6eb02744082db8672a920ae6009f
Server DB : mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Win64 (AMD64), source revision ab7b9cf9122f6eb02744082db8672a920ae6009f
MySQL Workbench Version : mysql-workbench-community-8.0.16-winx64
The same error occurs even if the version of Workbench is changed to 19 or 20.
How to solve it?
Manage Server Connections - screenshot
MySQL Workbench - screenshot
------More details---------
If you check the log file in the top Help tab of Workbench, you can see the log as below.
11:23:15 [INF][SQL Editor Form]: Opened connection 'DB Name' to mariadb.org binary distribution version 10.3.14-MariaDB
11:23:15 [ERR][ WBContext]: Unsupported server version: mariadb.org binary distribution 10.3.14-MariaDB
However, the connection is normally established on the other coworker's PC.

Related

IllegalStateException: Can not connect to database. Please check connectivity and settings

CentOS 7
Docker 20.10.5
In my machine run PostgreSQL 9.5 and success open my db:
localhost:5432/sonar
And success open DB by PGAdmin
Nice.
Now in Docker I installed SonarQube 4.5. And want to connect to my db.
I try this:
sudo docker run -e SONARQUBE_JDBC_USERNAME=sonar -e SONARQUBE_JDBC_PASSWORD=sonar -e SONARQUBE_JDBC_URL=jdbc:postgresql://localhost:5432/sonar sonarqube:4.5.7
But I get error:
2021.04.20 11:47:55 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 4.5.7 / e2afb0bff1b8be759789d2c1bc9348de6f519f83
2021.04.20 11:47:55 INFO web[o.s.c.p.Database] Create JDBC datasource for jdbc:postgresql://localhost:5432/sonar
2021.04.20 11:47:55 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
at org.sonar.core.persistence.DefaultDatabase.checkConnection(DefaultDatabase.java:115) ~[sonar-core-4.5.7.jar:na]
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:73) ~[sonar-core-4.5.7.jar:na]

Oracle 18c XE expdp specific schemas in xepdb1

I'm running Oracle 18c XE database in CentOS 7 and like to export a specific schema in xepdb1 database.
This doesn't work as system is unable to recognise the schema in xepdb1 database. Any help much appreciated
expdp system/password123 schemas=accts_db directory=accts_bkup_dir dumpfile=accts_db.dmp logfile=accts_db.log
This works for me finally
expdp system/********#at-app-prd-02:1539/xepdb1 schemas=accts_db directory=accts_bkup_dir dumpfile=accts_db.dmp logfile=accts_db.log
The listener was running on 1539
[oracle#at-app-prd-02 ~]$ lsnrctl status
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=at-app-prd-02)(PORT=1539)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=at-app-prd-02)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/product/18c/dbhomeXE/admin/XE/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...

Windows client error for DB2 10.5 fp3 DATA BASE Connection refused:Error:SQL30081N and SQLSTATE IS 08001

When we connect to database we got error in windows client machine.
Error:SQL30081N and SQLSTATE IS 08001.
SERVER:HP-UX DB2 10.5 FP3
Please suggest on this.
A quick Google suggests this may be the result of a firewall blocking the connection: http://www-01.ibm.com/support/docview.wss?uid=swg21503305

Create db2 dataSource in WAS liberty profile

I am developing for Websphere 8.5 (for z/OS), but i would like to use Liberty for local development on my Windows machine. I can't get the data source to work.
I created the following entry in the Server.xml to define the data source.
<library id="DB2JCC2Lib">
<fileset dir="C:\Program Files\IBM\SQLLIB\java"/><!--includes="db2jcc.jar db2jcc_license_cu.jar db2jcc_license_cisuz.jar"-->
</library>
<dataSource id="xxdb" jndiName="jdbc/xxxx" type="javax.sql.ConnectionPoolDataSource">
<jdbcDriver libraryRef="DB2JCC2Lib" id="db2-driver" javax.sql.ConnectionPoolDataSource="com.ibm.db2.jcc.DB2ConnectionPoolDataSource"/>
<properties.db2.jcc driverType="2" databaseName="xxxx" portNumber="50000" user="xxxx" password="{aes}xxxx"/>
</dataSource>
When my application initializes i get the following error message:
[jcc][4038][12241][3.61.65] T2LUW exception: SQL30081N Kommunikationsfehler. Verwendetes Kommunikationsprotokoll: "TCP/IP". Verwendete Kommunikations-API: "SOCKETS". Position, an der der Fehler erkannt wurde: "127.0.0.1". Übertragungsfunktion, die den Fehler festgestellt hat: "connect". Protokollspezifische(r) Fehlercode(s): "10061", "", "". SQLSTATE=08001
I think this message comes from the db2 Driver, unfortunately i didn't find a way yet to change it to english; but i think it's understandable for english speakers.
I have an ODBC System datasource that connects to DB2 v10 maintenance level 015 for z/OS. My local DB2 Connect Installation is v9.7.300.3885.
In my regular Websphere my working datasource has driver type 2, database Name set to the odbc-name and port number 50000. Server name is not set (empty). Classpath and implementation class is the same that i provided in the server.xml
I have tried everything i could find, any ideas?
Note: I can't make changes on the db2 server and there is no issue connecting to the database with other tools and the regular WebSphere.
Also the server name in the websphere configuration is empty, only database name is set. When i tried to set the servername in the server.xml to localhost or the db2 server i got the same result.
Any help is appreciated!
Edit: updated with correct Version Information
Edit 2: As long as it works i dont care what type (2 or 4) of the jdbc driver is used. I just want to point out again that type 2 is currently working on my machine. I tried it with type 4 and got the following message:
[jcc][t4][2043][11550][3.61.65] Exception java.net.ConnectException: Error opening socket to server xxx/xxx.30.3.34 on port 50,000 with message: Connection refused: connect. ERRORCODE=-4499, SQLSTATE=08001 DSRA0010E: SQL State = 08001, Error Code = -4,499
Sorry, previous post ate my xml. Trying again:
You will need a type 4 datasource to connect to a remote database server, i.e.,
<dataSource id="xxdb" jndiName="jdbc/xxxx" type="javax.sql.XADataSource">
<properties.db2.jcc driverType="4" serverName="the.db2.host.com" portNumber="50000" user="xxxx" password="xxxx" databaseName="LOC1" currentSQLID="SYSA"/>
<jdbcDriver libraryRef="DB2JCC2Lib">
</dataSource>
Type 2 is only for a local z/OS connection to a database resource. Your Windows, being remote from z/OS, requires you to use a type 4 connection. Type 4 requires both the serverName and portNumber to be specified. These are not applicable on a type 2 connection.

CentOS 6.7 and Windows MSSQL connection - FreeTDS and PHP

I searched for answers related to my question but not found what I'm looking for.
I have server with Linux CentOS 6.7. I need to connect to MS SQL Server 2005 on Windows Small Business Server 2003. In CentOS I installed FreeTDS and I managed to connect to SQL Server from terminal using this command:
# TDSVER=7.0 tsql -H ServerIPAdress -p 1433 -U username -P password
As far as I know this command bypass settings in freetds.conf.
Now I need to connect from PHP script. I'm using PDO extension and I tried this DSN string:
$db = new PDO("dblib:version=7.0;host=ServerIPAdress;dbname=Database;","username","password");
This leads me to first error:
Could not find driver
Ok, I understand that - my PHP 5.3.3 installation doesn't have installed PDO driver dblib.
My question: How can I install pdo_dblib driver in CentOS? Many tutorials and answers suggest to install through this command:
yum install php5-sybase
But that package doesn't exist:
No package php-sybase available.
If I check tsql configuration with command
tsql -C
I get these output:
Version: freetds v0.95
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 5.0
iODBC: no
unixodbc: yes
As I understand I need to configure FreeTDS:
./configure --enable-msdblib --with-pdo-dblib=/usr/local
But how can I configure FreeTDS after instalation? I tried to remove current version but I can't find way to do that. Also I tried to install another version but configuration doesn't change.
Any advice are appreciated.
When I run command # odbcinst -j I can see this output:
unixODBC 2.3.0
DRIVERS ...........: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLSETPOSIROW Size.: 8
Content of my freetds.conf:
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".
# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
tds version = 7.0
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
# A typical Sybase server
[egServer50]
host = symachine.domain.com
port = 5000
tds version = 7.0
# A typical Microsoft server
[MSServer]
host = 192.168.1.55
port = 1433
tds version = 7.0
odbcinst.ini:
[FreeTDS]
Description = FreeTDS v7.0
Driver = /usr/local/lib/libtdsodbc.so
UsageCount = 1
odbc.ini:
[MSSQL]
Driver = FreeTDS
Description = MSSQL Server Connection
TDS_Version = 7.0
Trace = No
Server = MSServer
Port = 1433
Database = MyDatabase
Username = DOMAIN\MyUsername
Password = MyPassword
I can make connection with isql command when I specify username and password:
# isql -v MSSQL "DOMAIN\MyUsername" MyPassword
But if I omit username and password isql generate error:
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed
I suspect that my username make problems because I have to use DOMAIN name followed by backslash before username when I connect to SQL Server 2005.
UPDATE:
I succesfully made connection in PHP and now I can run queries. I added this line on top of my script: putenv("FREETDSCONF=/usr/local/etc/freetds.conf")
Why is this necessary?