Unable to connect DB2 instance running in Docker using DBeaver - docker

I have installed the image ibmcom/db2 on docker running on local Docker Desktop in my Mac. The DB2 instance is up and running.
DB2 instance in Docker
But when I am trying to connect the DB2 server from DBeaver running in local I am getting following error message.
DBeaver error message
I know this problem has been solved in this post. However I am still not able to connect the database by following the suggestions given here, e.g. providing userid:password combination. Should I use this combination in user id field or password field, any idea?

Related

Unable to connect to AWS RDS instance from docker container

On my Windows 10 host machine I am able to connect to a private SQL Server RDS instance running in AWS. However, a Docker container running locally on the same machine is unable to connect with the same connection string.
From the Docker container I am able to telnet to the server on 1433 successfully. However, when I connect from code, it seems to be unable to create a connection. No exception is thrown, but this code hangs:
using (var conn = new SqlConnection(connectionString)){
// Do something
}
I am able to successfully connect to SQL Server when it is running on a EC2 instance. It appears to be specific to RDS.
Fails with both the name and IP address.
This was caused by a bug in SQLClient as described on GitHub. There were two fixes that worked:
Downgrade the project from Net Core 3.1 to 2.2
Update Docker file to use aspnet:3.1-bionic instead of aspnet:3.1-buster-slim and sdk:3.1-bionic instead of sdk:3.1-buster

MediaWiki docker image - mysql connection problem

I'm brand new to containers and am trying to set up a MediaWiki on a Synology NAS. The Synology comes with a package for MediaWiki but it is at 1.30 and they haven't updated in a year. I need a newer version so i can use LDAP with latest extensions.
So, i found this step-by-step guide on how to install the containers with docker. I'm trying it with MediaWiki 1.34.0 and it works fine up to the point that we test connection to the mysql database - 5) Input your MySQL container name and its root password.
When i click Continue i get this error: Cannot access the database: :real_connect(): (HY000/2054): The server requested authentication method unknown to the client. Check the host, username and password and try again. If using "localhost" as the database host, try using "127.0.0.1" instead (or vice versa).
It seems to be that the mediawiki container and the mediawiki-mysql containers aren't networked. I'm looking under network and it shows the following, so they should be able to communicate. I can ping a 172.26.0.2 and 172.26.0.3 address but can't figure how to get past step 5) in that go-by.
I've tried everything i can think of. Using older versions of MediaWiki (e.g. 1.31) and mysql but this connection problem is the sticking point each time. I've reached limit of my capabilities here.
It seems to be that the mediawiki container and the mediawiki-mysql containers aren't networked
Would be interesting where this assumption is coming from. From what I read from the error message, your containers can perfectly fine communicate to each other (they should, as they seem to be on the same network, given that the mediawiki-mysql container is also on a bridged network and in the same subnet).
Let's take a look at the interesting part of the error message:
The server requested authentication method unknown to the client
That looks, to me, as a misconfiguration of mysql. I assume you're using the latest version of the mysql docker container, which should be some version of mysql 8. If you now google for this, you'll find plenty of posts even on stackoverflow, like:
https://stackoverflow.com/a/53881212/3394281
php mysqli_connect: authentication method unknown to the client [caching_sha2_password]
To fix this with your current dataset, you could change the authentication plugin from socket to password:
Log in as root to mysql
Run this sql command:
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password
BY 'password';
Replace 'password' with your root password. In case your application does not log in to your database with the root user, replace the 'root' user in the above command with the user that your application uses.
Or, if you're using docker-compose or can change the executed command somehow else, you could follow this answer:
Add the following line to the command:
--default-authentication-plugin=mysql_native_password
Florian's answer put me on the right trail even though it didn't work as he initially suggested (I'm marking his as correct answer). I changed the root plugin (his item 2. above) but still did not work. So, I did the same on all of the users shown with the SELECT user, authentication_string,plugin,host FROM mysql.user;.
After, that i ran a FLUSH PRIVILEGES; and then was able to complete the MediaWiki 1.34.0 installation (via http://xxx.xxx.xxx.xxx:8080).
I suspect that all i really needed to do was run that ALTER USER on the two root accounts (root#localhost and root#%) but it is working now so i'm leaving it as-is. Here is a good link that will help with these commands.

How to connect to Neo4j from a web browser

I am just getting started with Neo4j and when I try to run a command that connects to the database I get an error. For example, if I try to run the first CREATE command from the sample movie database, or if I run CALL dbms.procedures().
The error is as follows: BoltConnectionError: No connection found, did you connect to Neo4j?
In the left panel of the browser page, under the 'Connected As' heading, it has my username and role (Admin). FYI, I followed the setup procedure from Larave's Homestead to install Neo4j in the first instance. On my first visit to the URL (port 7474), it asked for (and accepted) my username and password.
Additional Info:
Neo4j database is version 3.3.5 and runs on a Ubuntu VM
Neo4j browser is ver 3.1.7 and runs on the mac host
When I run :server connect it tells me I am connected via bolt://mydomain:7687
When I run lsof -i :7474 on the Ubuntu machine it tells me that Java is listening to the port, and that user is neo4j
First
:server disconnect
And then connect again
:server connect
If it doesn't work, change your browser.

Can't connect to a firebird server on docker

I'm a macOS user and I got weird errors just to create a database with firebird. I saw that there are some dock containers with firebird that run just fine ( i was able to create databases, perform queries and so on) but when I tried to connect from my local ISQL or razorSQL client ( through JDBC), I get some weird errors like "unavailable database" or "can't open file"
I'm also not sure how ISQL CONNECT string really works because every site I saw there is a different one.
I got this docker image: ( https://hub.docker.com/r/jacobalberty/firebird/)
I created my container like this:
docker run -d --name firebird -p 3050:3050 -v /data/firebird/databases:/databases jacobalberty/firebird:2.5-ss
my docker-machine IP is:
192.168.99.100
I tried to connect like this:
CONNECT '0.0.0.0:3050://databases/test.fdb' user 'SYSDBA' password 'masterkey';
unavailable database
And also like this:
CONNECT '192.168.99.100:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
connection rejected by remote interface
CONNECT '192.168.99.100:3050:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
Statement failed, SQLSTATE = 08001
unavailable database
When i enter the docker container, the file is there:
root#e4212b9f9d16:/databases# pwd
/databases
root#e4212b9f9d16:/databases# ls
test.fdb
Also, I'm not sure how to check if the firebird server is running ( i guess it is cause I can 'connect' to a database inside the container'.. but the docker container is definally up and running - did a successful telnet on the ip and port)
I also tried to use the container IP (172.17.0.2) but i got a timeout
Im most familiar with mysql and SQLite never touched a firebird db before and as the user got this DB, i have to mock it, develop an app using fake data and then connect it to the real firebird (so changing the DB is not an option)
So, the standard documentation about 'create your firebird server' don't mention but you on firebird.conf, the variable RemoteBindAddress must be empty
File:
/etc/firebird/2.5/firebird.conf
Lines changed:
RemoteBindAddress =
#RemoteBindAddress = localhost
Thanks for all the
Most of your problems are your connection string, it should be <host>/<port>:<database-path-or-alias>, where leaving of /<port> will default to port 3050.
This accounts for all your problems except for
CONNECT '192.168.99.100:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
connection rejected by remote interface
As that connection string is a valid one.
This error means that you were able to connect to the server, but the connection was rejected. This might - for example - happen when you use Firebird 3, but connect using a Firebird 2.5 ISQL/fbclient library, and haven't relaxed the security settings of Firebird 3 (see Legacy Authentication in the Firebird 3 release notes).
In order to find out if the server is running, use:
docker ps
In order to figure out if the server actually started, or errored out upon start, start the container without the -d and look at the log messages when it runs:
docker run --name firebird -p 3050:3050 -v /data/firebird/databases:/databases jacobalberty/firebird:2.5-ss

Problem stopping/starting MySQL Workbench

I've installed the MySQL workbench version 5.2.34 and having problems creating a local connection. I'm getting an error saying "Can't Connect to MySQL Server on 127.0.0.1'(10061)" when i try connecting to Localhost on Port 3306. I tried restarting the service but i don't have the option to stop/start/pause or resume using Windows 7. The status is just set to "starting". I also tried "net stop mysql" from the command line in DOS but get the following error: "The service is starting or stopping. Please try again later"
Does anyone know if this is another bug in the Workbench or is there a quick solution to get around this?
You can restart mysql from services. Also, check error log (by default, on Windows 7 machine it's under ...ProgramData\MySQL\MySQL Server [version]\data
Sounds like a problem with MySQL itself starting up. You may have to kill the mysqld process if nothing else gets it into a started or stopped state, and then investigate the .err logs in your data directory.
This solution uses the window's mysql installer which you have used to install your MySQL.
Even though this post is very old, I have wasted around 2 hours and hence want to post this so that it can save someone else's time.
I have tried every other way of restartring the service, but mysql service just wont start.
Start your windows mysql installer. For me it was "mysql-installer-community-8.0.20.0"
Then remove/uninstall the SQL Server and remove all configurations
Manually delete the SQL Server folder from "C:\Program Files\MySQL\MySQL Server 8.0."
Start your mysql installer again and install the SQL Server again
You can check now that the MySqL Server has started.

Resources