Google Data Studio Connector MySQL doesn't work with MySQL 8.0 version. It seen to be an authentication problem.
My MySQL Version: 8.0.17
Linux Ubuntu
I have tried all 3 types of password Authentication Type: Standard, Casching_sha2_password and SHA256 password.
All firewall are inbound rules open.
The mysql user has wildcard %.
I expect that connect to the database, maybe tring to change any authentication configuration at the server to work like version 5.
Error message: "Não foi possível fazer a conexão ao banco de dados. Verifique seus parâmetros de conexão. Saiba mais sobre conectores de banco de dados aqui.
Código do erro: 1d3f4578" - Sorry about the portuguese. It's a generic not connection error.
I tried to use in my.cnf:
[mysqld]
default_authentication_plugin=mysql_native_password
Tks.
I confirm that Google Data Studio has problems connecting to MySQL 8.
Please see the following thread on Data Studio Help forums: https://support.google.com/datastudio/thread/4115506?hl=en
I also confirm Mysql 8 is not compatible: see another issue here:
https://support.google.com/datastudio/thread/70033771?hl=en
For future reference, as of the 29 Apr 2021 Update, Google Data Studio supports MySQL 8:
MySQL 8 support
You can now visualize data from MySQL 8 using Data Studio.
I found a workaround here (copy & paste below)
https://support.google.com/datastudio/thread/4115506?hl=en
I've just resolved the issue using ProxySQL (https://github.com/sysown/proxysql). It supports rewriting queries on the fly. Using that feature you can replace the unsupported global variables with null and then forward the query to your database, making both your database and Google Data Studio happy.
Here's a how to for your convenience.
After installation, before you start the service, edit /etc/proxysql.cnf as follows:
Section admin_variables:
Set admin password in admin_credentials variable.
It supports both plain text (eww) or hashed password (output from PASSWORD() function in MySQL). I suggest using the hashed password. The password function is not available in MySQL 8 anymore, but you can use this SELECT to generate the hash of your password:
SELECT CONCAT("*", UPPER(SHA1(UNHEX(SHA1('your_password'))))) AS password;
I've changed mysql_ifaces to 127.0.0.1 as I prefer rather restrictive policy.
Section mysql_variables:
Set default_schema to match schema we use
Set server_version to our MySQL server's version
Here you need to keep the interfaces open to public so the GDS can connect to it. However you can update the port it listens on (default is 6033).
Section mysql_servers:
Uncomment first section (except of max_replication_lag), fill in DB server's IP and port
Section mysql_users:
Uncomment first section, fill in your GDS user credentials. Again it supports both plain test and hashed format of password, use the hashed one.
Section mysql_query_rules:
This is the part doing the magic for us.
Use following rules to replace unsupported global variables with null.
{
rule_id=1
active=1
match_pattern="\#\#query_cache_size"
replace_pattern="null"
apply=0
},
{
rule_id=2
active=1
match_pattern="\#\#query_cache_type"
replace_pattern="null"
apply=0
},
{
rule_id=3
active=1
match_pattern="\#\#tx_isolation"
replace_pattern="null"
apply=0
},
Save the file. And start the service (e.g. systemctl start proxysql).
Open port 6033 (or any other you've set in the mysql_variables.interfaces) to the public in your firewall.
Update your connection in Google Data Studio to use this port.
And you should be up and running.
Related
I have Oracle SQL Developer version 4.1.19 (64 bit) with JDK8 included.
This is working for Oracle connections which require a {username, password} combination - no problem there.
My issue is that I cannot connect with an OS Authentication configuration.
Please note that I can connect from the command line with OS authentication by using sqlplus /#MY_TNS_NAME and this works fine.
I have the SQL Developer application configured to use the OCI/Thick driver and also to use the x64 12.1.0.2.0 basic instant client. This seems to be configured ok in that if I check Help->About-Properties then sqldeveloper.oci.available has the value "true".
However, each time that I test the connection I receive the failure message
"ORA-01017: invalid username/password; logon denied"
My OS is Windows 7 Enterprise x64 SP1
I have obviously checked the option "OS Authentication" :).
Is there any other configuration that I need to change/check in order to get SQL Developer to allow me to connect via OS Authentication? (Changing the authentication type is not an option for me).
Thanks in advance.
Had the same issue. The cause is that SQL Developer's lightweight JDBC does not support extended authentication. SQL*Plus, to the contrary, is compiled against native driver, that's why it has no problem.
Solution: in SQL Developer, go
Tools -> Preferences -> Database -> Advanced Parameters
If you have Use Oracle Client already checked, just check Use OCI/Thick driver. That's all. If not, check Use Oracle Client first, and specify driver path. Idea was taken from here
Speaking about clients, Oracle allows to have a zoo of versions. If you have problems selecting working client, the cleanest option would be to use path where your SQL*Plus resides. Just strip \bin from its end, and make sure its CPU architecture matches SQL Developer.
Oracle Sql developer and sqlplus work with OS authentication in absolutely different ways.
Sql developer always tries to authorize by substituting to the user name "\".
SLQPLUS substitutes only the user name. When adding a domain to the user name.
OSAUTH_PREFIX_DOMAIN = TRUE (windows registry). Sqlplus appends the domain name to the name.
Sql developer always tries to authorize by substituting to the user name "\" without domain name.
Example 1.
CREATE USER "OPS$ORACLE.ADMIN" IDENTIFIED EXTERNALLY
PROFILE DEFAULT
DEFAULT TABLESPACE tablespace_oracle_admin
TEMPORARY TABLESPACE TEMP
QUOTA UNLIMITED ON tablespace_oracle_admin
ACCOUNT UNLOCK ;
C:\ORA\DB\product\11.2.0\dbhome_1\bin\sqlplus /
SQL> Select user from dual;
USER
___________________
OPS$ORACLE.ADMIN
To connect from sql developer with the database, it is necessary to put the "/" symbol instead of the
user name without specifying a password.
Select user from dual;
USER
___________________
OPS$ORACLE.ADMIN
Example 2.
CREATE USER "OPS$\ORACLE.ADMIN" IDENTIFIED EXTERNALLY
PROFILE DEFAULT
DEFAULT TABLESPACE tablespace_oracle_admin
TEMPORARY TABLESPACE TEMP
QUOTA UNLIMITED ON tablespace_oracle_admin
ACCOUNT UNLOCK ;
When connecting to using Sql developer, OS authentication work!!!!
Select user from dual;
USER
___________________
OPS$\ORACLE.ADMIN
Where are your Sqlnet.ora and tnsNames.ora files located?
I had to create an environment variable TNS_ADMIN with a custom location that contained my sqlnet.ora and tnsnames.ora files.
Make sure your sqlnet.ora file contains the line:
SQLNET.AUTHENTICATION_SERVICES = (NTS)
You also need to ensure that the instant client location e.g. c:/instantclient12 is the first entry in your PATH variable.
What happens when you press the test button when setting the Oracle client location in sql developer?
I am new to Oracle. I did a fresh installation of Windows 7 x64 on my laptop to install Oracle 12c Enterprise Edition (for learning purpose).
While on admin windows account, I first made a standard windows user with a password to use during the installation. The installation went fine as well as the creation of default ORCL database. The only warning I got was "The selected Oracle home is outside of Oracle base" which I fixed by going back to directories option and setting the directory from "Admin Name" to "Oracle" and it adjusted all directories according to "Oracle" name (I found this solution on internet).
Now after system restart, I am trying to connect to ORCL database using username and password I defined in setup and it just keeps telling me that my logon is incorrect "ora-01017 invalid username/password logon denied" whether I use SQL Developer or SQL Plus command line ?
I have tried searching on internet and didn't find anything much useful or say it's too technical that I don't understand, can anyone explain in simple way that what should I do to make this thing work ?
Thank you and sorry if I sound frustrated, I did this installation twice on Windows 8 which led to errors in my OS then switched Windows 7 and now this third installation is also leading to this error.
Open SQL Plus and type this "Sys as SYSDBA" for username and don't type any password and it will automatically connected.
Enter user-name: Sys as SYSDBA
Enter password: (don't need)
Screenshot
http://i.stack.imgur.com/E4seR.png
remember password is case-sensitive by default, maybe this could be your problem.
in oracle 11g and 12c this parameter is case-sensitive., so check your password and write it as you created.
try to login with a user that have CONNECT grant. sys or system should work.
I can relate since I went through the same thing recently. Under Windows 10 (2020).
In my case, I use Spanish language computers, and by default, Oracle 12c for Windows expects an ENGLISH language character set or whatever.
SOLUTION: Go to Windows Regional Settings and select English as the default "regional format". In my case I went with "Spanish (United States)". Then restarted SQL Developer and BOOM: No more cryptic "ora-01017" errors!
GOOD PRACTICE: I only added "SYS" as SYSDBA to connect for the first time (since I have no other users YET). From the much-expected SQL Developer's Worksheet (SYS as SYSDBA) I created a "normal" user. Then, I created a "default (normal)" connection profile for that new user and started doing DDLs from that connection.
It works flawlessly from there. Hope it helps in your case!
I'm trying to create a database on my local machine using SSMS version 11.0.2100.60. I've run the application as administrator, logged in using Windows authentication, and I've added MYDOMAIN\my-username to the Logins. However if I try to create a db with this login I get the message
CREATE DATABASE permission denied in database 'master'.
(Microsoft SQL Server, Error: 262)
If I try to add the privelage dbcreator to my user, I get the following error.
User does not have permission to perform this action.
(Microsoft SQL Server, Error: 15247)
I can't log in as sa as I don't know/remember the password (is there a preset default?), and if I try to change the password I get the message:
Cannot alter the login 'sa', because it does not exist or you do not have permission.
(Microsoft SQL Server, Error: 15151)
Finally I note that the account 'sa' is disabled, and if I try to enable it I get the same error as before. Is there any way around this or do I need to re-install?
Version info:
Microsoft SQL Server Management Studio 11.0.2100.60
Microsoft Analysis Services Client Tools 11.0.2100.60
Microsoft Data Access Components (MDAC) 6.2.9200.16384
Microsoft MSXML 3.0 4.0 6.0
Microsoft Internet Explorer 9.10.9200.16635
Microsoft .NET Framework 4.0.30319.18051
Operating System 6.2.9200
I found the answer here:
In order to start SQL Server in single-user mode, you can add the
parameter “-m” at the command line. You can also use the SQL Server
Configuration Manager tool, which provides proper controls for the
file access and other privileges. To use the Configuration Manager
tool to recover your system, use the following steps:
Open the Configuration Manager tool from the "SQL Server 2005| Configuration" menu
Stop the SQL Server Instance you need to recover
Navigate to the “Advanced” tab, and in the Properties text box add “;–m” to the end of the list in the “Startup parameters” option
Click the “OK” button and restart the SQL Server Instance
A little more specific :
Open Sql Configuration Manager.
Select SQL Server Services.
On the right hand side, select the instance.
Right click on it and open properties.
In the advanced tab attach ";-m" at the end of the Startup Parameters field.
Apply and restart the service.
Now you have privilege to enable "sa" user and modify its password.
once done, remove ";-m" and restart the service.
You are good to go.
I'd like to point out an alternative answer laid out on DBA SE. Download PSExec onto the box that is having the problem and follow the instructions laid out in this blog post to effortlessly change admin settings using the NT Authority\System account.
./psexec -s -i "C:\...\Ssms.exe"
Wanted to share this solution as it solved my problem!
I'm creating new login in SQL Server 2008 with following sql script:
CREATE LOGIN [xyz] WITH PASSWORD='xyz',
DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english],
CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
It creates new login successfully. But when I try to login with it using SQL Server Management Studio it fails saying:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
What's wrong? How do I solve this issue?
Here is how I done it, maybe it works for you too.
login Microsoft SQL Server 2012 with windows authentication.
right-click onto the server name in Object Explorer and click Properties
In the new tab click Security
select SQL Server and Windows Authentication
Ok
Close the SQL server management studio.
start+run
write services.msc
search for SQL there and restart all services.
that works for me.
It's also possible that you're trying to use SQL Server Authentication without having enabled it. To fix this, right-click Properties on your server instance in SQL Server Management Studio, and update the security settings to include "SQL Server and Windows Authentication mode".
Looks like you're trying to connect using named pipes, but SQL Server is not listening on that protocol. See MSDN.
The two fixes MSDN suggests are:
Connect using TCP/IP, or use the SQL
Server Configuration Manager to
enable remote connections using named
pipes.
Using SQL Server Configuration
Manager on the client computer, move
TCP before named pipes in the
protocol order list.
I had a similar issue:
1. log in as the master user or windows authenticated user.
2. right click on the database --> properties --> security -->
3. change Windows Authentication mode to "SQL server and windows authentication mode" by clicking on the radio button. (if it is not)
4. restart the server
I had the same issue when i first setup SQL Server 2014 on my local machine.
In my case the solution was to set a correct defualt database.
Login with Administrator in SQL Server
Go to Securities >> Logins >> select your user name and go to properties
From Status >> uncheck user account lock check box
Change password for the user
Restart the sql server and login with your username.
I was facing the same error.
I've resolved the error by following below mentioned steps:
Disable named pipes and restart sql services.
After restart sql server I enabled names pipes and did a sql server restart again (Link for Step 1 and 2)
Connect to SQL server via studio.
Right click on SQL instance --> Properties --> Connections --> "Set the Maximum number of 5. concurrent connections to '0' ".
Save the change.
Restart the SQL server if possible. (Link for step 3 to 6)
I hope this will help someone
This is might not be a connection issue . Check your default database and if that is online . More commonly this issues seen when the default database will be offline or not exists . If your default database other than master ,better check this option.
I got a way to go around the problem.
Open one instance and login using the windows authentication
allow sql and windows auth both by right cliking on the db server.
Open second instance and login using sql authentication.
bingo the sql authenticated instance open .. :)
Actually in this way we cheat the sql authenticated instance as it tries to find an already running instance.. worked fr me.. good luck
I tried most of the solution but was not able to solve it until I found this URL which says to do the following:
Open SQL Server Management Studio and run the these queries:
sp_configure 'show advanced options', 1;
go
reconfigure
go
sp_configure 'user connections', 0
go
reconfigure
go
The reason why we got this error is that the user connections was reset to 1, so only one user was able to connect with the SQL server.
just a simple query worked for. I hope this will work for others as well.
I have not used the script style, but login through GUI I encountered the same error code. I had entered wrong user name and this is why I was getting the Sql Server, Error: 233. In order to resolve this, you should input the following information:
Server Name: MachineName\SQLEXPRESS
Authentication: SqlServer Authentication
User Name: Assigned user-name or simply sa
Password: xyzpqr
NOTE: Here I have wrote above data for demo purpose only, actual data is your machine & software's properties.
According to: https://msdn.microsoft.com/en-us/library/bb326280.aspx
Go to --> Remot setting
Go to "Remote" tab
in "Remote Assistance", Tick "Allow Remote Assistance connection to this computer", Click the "Advance" button and tick the "Allow..." and in the "Invitation" set the "30 days"
Then in the "Remote Desktop" part
Just tick "Allow remote connection to this computer"
After following the examples here and still not getting in, I found that my sa login was disabled. The following got me in:
Logged back in under windows authentication.
Expanded Security Tab
Expanded Logins Tab
Right-clicked sa and selected Properties
Went to the Status Tab
Under Login: Clicked 'Enabled' radio
Restarted Server and logged in as sa.
This assumes you have set sa password already using
ALTER LOGIN sa WITH PASSWORD = '<enterStrongPasswordHere>' ;
"A connection was successfully established with the server, but then an error occurred during the login process."
I was getting this problem from sqllocaldb when used from within Docker. The problem was the Docker image was not allocated enough memory. Increasing the memory actually fixed the problem.
I have this problem which I am trying to debug for a lot of time.
The setup is like this:
i. The application is a Windows application developed using VS2005, .net 2.0.
ii. I use the Cyrstal reports component Crystal Report Viewer and dynamically display various reports in the same form.
iii. The db is SQLSERVER Express 2005 and situated on a different machine.
When I run the application on the db server, I am able to view the report. However, when I run the application on a different machine which is connected to the above dbServer, I get an error. ( I dont get this error on my dev setup)
Source: CrystakReprotViewer.CS:SendDBLogonForReport() Details:Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
SQL State: 08001
Native Error:
Error in File C:\DOCUME~1\admin\LOCALS~1\Temp\ActionPoints {52820D22-199C-4D46-A76B-70A55D9F54D5}.rpt:
Unable to connect: incorrect log on parameters. at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable)
at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
at Trivalve.UI.Client.Reports.CrystalViewer.CrystalReportViewer.SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument) in D:\Ramjee\Work\Projects\Trivalve\Trivalve\src\tfssetup\2008\Trivalve_2008\Trivalve\Reports\CrystalViewer\CrystalReportViewer.cs:line 127 rptcontrollers.dll SetTableLocation
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Thanks,
Ramjee
Use datasource=servername or ip address\instance name if available,port number
Default port number is 1433 or 1434
My problem was solved with this. Posting for the use of others.
If this is a standard installation of SQL Server Express, bear in mind that the only connection method installed by default is shared memory, and is only available on the server -- you would need to enable another connection protocol such as Named pipes or TCP/IP. To turn networking on, Use SQL Server Configuration Manager to enable relevant protocols and start SQL Browser.
It's telling you exactly what's wrong.
Details:Logon failed.
Great, we can't logon.
(Invalid Instance()).]Invalid
connection.
Okay. I bet we have "localhost" as part of the instance name in my connection string. Since I'm no longer on the "localhost", this obviously won't work. Let's try there first. Then perhaps it's the credentials that I'm using to query my database. Usually what I do is create a RO user that can only do selects on my db and use that for CR. If none of these are getting me close, let's try making sure that remote connections are enabled for SQLEXPRESS
Unable to connect: incorrect log on
parameters.
Ok it's definitely a connection issue.