MySQL workbench error - "Could not encrypt password cache" - mysql-workbench

when creating a new connection and when inserting the password for the username in mysql workbench i'm getting the error of "Could not encrypt password cache"
can anyone suggest a solution ?

That's part of the security concept in Windows. Once you encrypted data with a specific user, only this user can also decrypt it. It's not possible to use a different user, even if that was created with the same name + password.
You have to remove the password vault from the MySQL Workbench data dir and enter (and store) the MySQL password(s) again.

Related

How to connect MongoDB Compass using MLab connection string

I have database hosted on MLab and I am trying to connect it with Compass. I am using host and port given in connection string but it is showing error, here is my screenshot:
What am I doing wrong?
Had same problem manage to solve it like this:
A. Go to your db in mlab and in the tab choose "users"
B. Create a new user ex: username: admin password: 123456
C: Go to compass and fill it this way
Example of your connection path
ds012345.mlab.com:56789/myDBname
hostname
ds012345.mlab.com
port
56789
authentication: username /password
admin // or the name of the user you created in step A
123456 // or password for the user you created in step A
authentication database
myDBname // the name of your database in mlab
I just had the same problem.
I fixed it by updating my version of MongoDB Compass. No problems encountered with version 1.15.4.
Also, Authentication Database should not have the value "admin" but the name of the DB to connect you.
To make your connection easier, don't hesitate to copy your entire connection string into the clipboard. Compass detects it and proposes to automatically fill in the connection form.
The problem that I had was the Authentication Database Compass filled in automatically wasn't correct for my setup. By default, this was pointing to admin but it needs to point to the database that the user is associated with.
Summed up: The database of admin didn't exist.
Just to rule it out, double check what database you're pointing to. It should be in the name, like ds739176/database_name where database_name is, you guessed it, the name of your database.
Hope this helps.
The required credentials are not your login credentials to MLab,
instead these are database user credentials.
How to get them:
click on your DB on MLab.
go to users tab and create new user.
use the created users credentials to access db.
set authenticationdatabase to be your database.
I had the same problem. MongoDB url was working in code but Authentication failed was showing in MongoDB Compass.
When I checked, my mongodb password was iam%40me1234.
Here I'm using %40 HTML hex code in the password for # character.
So, If we will use the original character in the password like iam#me1234 in MongoDB Compass then it will work great.
Here is a full list of Hex codes
What I did:
Click on "Fill in connection fields individually" option in Compass.
Enter the hostname (Example ds051234.mlab.com)
Enter PORT (Example 12345)
Select Username/password in the Authentication option.
Enter username and password (Create a new user in mlab.com for your database)
Authentication Database (Just enter the "database name" in this field. Example: heroku_8967jgy5)
I hope this will help you.

Accessing a LocalDB database only with username and password

I have an application which uses LocalDB. I would like this database to be protected with at least a password. Nobody should access the data without knowing the password.
I have tried creating a login into database but, anyone can still access inside by using Windows Authentication easily.
Target machine doesn't have SQL Server Management Studio, so I should keep everything portable in the database file (.mdf .ldf)

Connecting to MongoDB Without Credentials in AWS Glue

I am trying to move my data in MongoDB to Redshift using AWS Glue. To do this, I am trying to add a connection to MongoDB. My MongoDB setup does not have credentials configured. But the Username and Password fields in the Add Connection page are mandatory. Test Connection fails on giving dummy values as they will be considered during the authentication process. Would appreciate any help in this regard.
To be upfront I haven't tried this myself, but to remove the requirement for Username and Password is easy.
Basically in the Migration Setup Wizard in the "Authentication mode" drop-down box select "none". Default value is "password, where the username and password is mandatory.
Hope that assist.

DB2 Can't connect to db with new user

I have created a DB2 database, and I'm trying to create a new user.
Here the steps I made :
- Creating an OS (Linux) user with root account (useradd myuser)
- Giving a password to the new user (passwd myuser)
- On IBM Data Studio, I added a new user and grant him connect to the database
But on Linux, with the user which owns the instance, I tried to connect to the database with the new user (db2 connect to MYDB user myuser), I've the following :
SQL30082N Security processing failed with reason "24" ("USERNAME AND/OR
PASSWORD INVALID"). SQLSTATE=08001
Am I doing something wrong ?
Thanks in advance for your help
The answer might depend on the DB2 version. Until DB2 9.7 fix pack 1 you could not have the password longer than 8 characters. And how long is the actual user name? I would limit that to 8 characters as well. The error is quite clear: the user authentication fails, and DB2 relies on the OS for authentication.

What is the default username and password for PostgreSQL?

I am working on an open source application that has PostgreSQL as its default DBMS. Now when I install it on my system, its configuration is so that PostgreSQL also gets installed with it.
My problem is with getting access to the installed PostgreSQL database. The database that gets created during installation is named iviewdb.
I read at many forums that the default superuser is postgres, but when I try to get access to the database using this username through a command prompt, it prompts me for password that I don't have.
I wanted to know from where in the PostgreSQL installation directory
the default username and password with the port number to access the database is stored. I have even tried changing the pg_hba.conf file, but that creates a problem with the application and it won't start then.
How can I find the password for this database? I am working in a Windows environment.
The password isn't stored in an easily recoverable manner, and if you change the password, the application may not be able to access the database properly. You may find the password in the application settings or documentation, though.
If you decide to risk changing the postgres user's password, stop the application and PostgreSQL service, and then edit pg_hba.conf. Add (or change if it already exists) a line (if it doesn't exist, add it before any other "host...." lines):
host all all 127.0.0.1/32 trust
And restart the PostgreSQL service. That should give you access from localhost, where you could change the postgres user's password, or add yourself another user with the permissions you want. Then set the pg_hba.conf file back the way it was and restart.
I've encountered this similar problem, and I noticed that the default being set for PostgreSQL upon installation in my case is as follows:
username = postgres
password = ' '