Mysql workbench - create user with standard password - authentication

I have updated mysql workbench to 8.0.12,
And I have a big issue with the user management.
Some application do not support SHA2 authentication and I struggle finding a way to use standard one.
In previous version I could easily create user with different type of authentication (standard / caching_sha2_password).
Some advises will be really appreciated.
Downgrade to previous version would be last option.
[edit]
when creating the user I can select standard mode. But as soon I apply the creation, it automatically switch to caching_sha2_password
[/edit]
Thanks

You need to change the default_authentication_method of the server. You can either manually edit the config file and add the following:
default-authentication-plugin=mysql_native_password
Or you can update the options file through MySQL Workbench by going to Server > Options File >
You will then need to restart the server and recreate your user with the required authentication plugin.
You can read more here.

Related

How to create a login on a test server without active directory domain?

I'm trying to create a login on our test server with:
CREATE LOGIN [<DOMAIN>\<LOGIN>] FROM WINDOWS;
GO
As opposed to the live server the test server does not have any active directory. So it fails with:
Windows NT user or group 'DOMAIN\LOGIN' not found. Check the name again.
Worth to be mentioned, that on the test server we use a backup of a database dump from the last release and apply new migrations to this dump. This means, that this error would not occur, if a more recent dump from the live server was used, where the active directory login already exists.
To enable proper testing, we discussed three possible options:
Recreate the active directory on the test server: I would like to avoid this, because nobody really wants to administer an additional active directory clone for testing purposes.
Use a more recent database dump: The problem here is, that the live server is not ours and we only have restricted access to it. It is possible, but still not the optimal solution in regard to practicability. Also, it would mean, that we would play in migrations to the live server before having tested them on the test server.
Alternative SQL syntax: I am aware, that there alternative ways of creating logins, e.g., CREATE LOGIN <login_name> WITH PASSWORD. But I could not think of any way, which allows us to create logins depending on which system we are on.
Option 3 is our strong favorite, but we are missing a piece to the puzzle. Anything we are missing here?
You can create a new user on your local computer.
And then add this new user to the instance.
CREATE LOGIN [<domainName or your hostName>\<login_name>] FROM WINDOWS;

How to fix the issue: "The specified database user/password combination is rejected" using Intellij IDEA?

I'm using Spring application and stack is like: Java 11, Spring Boot 2.2.1.RELEASE.
(technology versions may vary here)
When I try to connect to the database via Data Source using Intellij IDEA, I get always the issue like:
The specified database user/password combination is rejected:
[28P01] FATAL: password authentication failded for user 'postgres'
How can I fix it?
To be noticed: this answer is similar, but not related to:
Unable to connect from Intellij to mySql running in docker container - "specified database user/password combination is rejected"
To fix it:
you need to check your application.properties file and change the value of user password on line:
spring.datasource.password=your_password
The cause of issue is:
your value of the property spring.datasource.password in application.properties
does not match the user password what was selected by default during installing your database system.
E.g. more specifically on the step "Enter the password for the database superuser (postgres)":
To clarify: provided example is for PostgreSQL, but it can be another database system.
Edit: this assumes you run Linux
if the other answer provided by invzbl3 doesn't work, check out this solution, it worked for me. Make sure to restart afterwards.
https://docs.fedoraproject.org/en-US/quick-docs/postgresql/#_initial_configuration
If you’re getting ident errors from your app you’ll probably need to perform the accepted solution described at https://serverfault.com/questions/406606/postgres-error-message-fatal-ident-authentication-failed-for-user?newreg=a4fdc3e21349449985cc65b82399c5b4
(if you don't have nano, just use any other text editor)
sudo nano /var/lib/pgsql/data/pg_hba.conf
and edit host all all 127.0.0.1/32 ident to host all all 127.0.0.1/32 md5.
This should allow most applications to connect with username/password.

Can you change anonymous in mysql general_logs?

I have mariadb server, which contains database and i have my website on apache server that connects to this database through PHP and my general logs seems like this:
logs and i dont like it shows "as anonymous" instead of for example "as apache". Can i somehow configure my apache server to integrate with it? Or should i use other logs than general_logs to get information what exactly send that query? My system is Fedora 33.
Some MySQL installations permit users to connect as the anonymous (unnamed) user to the server running on the local host.1
and if you head over to dba forum you find this on how to disable those:
https://dba.stackexchange.com/questions/51452/how-do-you-disable-anonymous-login
Subsequently you want to update your PHP configuration to login with the new credentials.

How do I add additional active directory logins to an Azure database?

I have been able to set up an active directory login for my Azure database.
Now I want to add additional active directory logins and set their permissions
I understand that I need to use Management Studio to do this and have installed SSMS v17.8.1
I have been studying docs but I can't find the instructions
[Update]
After reading Conor's answer I was able to create the user
CREATE USER [jobuser#mydomain] FROM EXTERNAL PROVIDER WITH DEFAULT_SCHEMA=[dbo]
However if I try to login using MSSMS with Active Directory - Password authentication I get
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' (MIcrosoft SQL Server, Error 18456)
[Update]
In the Connection Properties Tab
I had to overtype with the database name
That particular page only shows an example using a SQL login/user, so I can understand why you are confused.
Please read through this page:
https://learn.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-2017
Specifically, you want to create a user using the AS EXTERNAL PROVIDER example. This tells SQL Azure (and SQL DW) to use Azure Active Directory instead of creating a SQL user. Please note that this does not (as of today) work in SQL Server. (SQL Server supports integrated authentication against a local Active Directory, but it just does not currently support the Azure Active Directory service).
Also, there is no specific requirement that you use SSMS to do this step. You can do it within SSMS, SQL Operation Studio, through one of the SQL client drivers in a program you write (or some third party program that can invoke SQL over them), sqlcmd, etc. You don't even need to have the latest SSMS to make things work (though it is recommend to get the best experience against SQL Azure including syntax highlighting).
Please give that a try and see if it gets you unblocked.
Best of Luck!

Installing SSRS 2012

"Install and configure" radio button is disabled for me when installing Reportin Services. Can anybody explain why?
P.S. Using SQL Server 2012, Standard Edition.
The behaviour is explained in Reporting Services Configuration Options (SSRS), though it's really impossible to tell what the specific issue is in your case.
From the article:
Install and configure Installs a report server instance in Native Mode
using the default values for the report server databases, service
account, and URL reservations. When you choose this option, the report
server instance is ready to use when Setup is finished. Setup creates
the report server database using a local Database Engine instance, and
configures a report server to use default values.
This option is available only if the default values used in a report
server installation are valid for your system. This option is
recommended for developers who want to install all components locally,
and for users who are evaluating the software.
(Emphasis added)
So there is something in your environment that is preventing this option. To investigate, the article suggests:
To view information about the default Settings that Setup uses, or to
find out why the default configuration cannot be installed, click
Details.
It also suggests looking at What is the Default Configuration to help get more details.
You will need to review all this information in your own environment to get your specific issue.