Unable to connect Plesk MySQL from remote server - plesk

I am trying to connect to Plesk MySQL server from another server. I am trying to access it using IP address But It always gives the error like.
"Can't connect to MySQL server on 'xx.xxx.xxx.xx' (4)"
Remote access setting of MySQL server are ."Allow remote connections from any host"

Here's the steps to "Allow remote connections from any host" :
Open a DOS command prompt on the server.
Run the following command from the mysql\bin directory:
{mysql -u root --password=}
A mysql prompt should be displayed.
To create a remote user account with root privileges, run the following commands:
{GRANT ALL PRIVILEGES ON . TO 'USERNAME'#'IP' IDENTIFIED BY 'PASSWORD';}
'USERNAME' is the username to be created.
'IP' is the public IP address of the remote connection.
'PASSWORD' is the password to be assigned for this username.
(IP can be replaced with % to allow this user to logon from any host or IP)
mysql> FLUSH PRIVILEGES;
mysql> exit;

Edit /etc/my.cnf and change to (via ssh):
bind-address = ::
And restart db:
service mariadb restart

Long story short. You can't. Your provider does not have that featured enabled. Switch to cPanel providers.

Related

How to connect to Azure SQL Database through a VM jump host using DBEaver?

What I have:
Azure SQL Database on private virtual network
Jump host - Whitelisted Azure VM that can connect to the Azure SQL Database
Local machine --PuTTY--> Jump Host --sqlcmd--> Azure SQL DB
What I want to do:
Usually I PuTTY into the VM and use sqlcmd to operate, but the GUI is difficult to view when query a lot of data. So I want to use DBEaver on my local machine to access the Azure SQL Database.
Config used:
In Connection setting -> Main: Azure SQL Database (same server host, port, database, username, and password as usually used in sqlcmd)
In Connection setting -> SSH: Jump host
In Connection setting -> Main -> Edit Driver Settings -> Libraries: jdbc 9.4.1.jre8 and jdbc_auth 9.4.1.x64
Problem I face:
I tried to use ssh tunnel configuration to connect. In image 1, when I click "Test tunnel configuration", it can successfully connect to the whitelisted VM.
a) In image 2 main config, I tried to use hostname in host and click "Test connection". It failed with error message
Cannot open server "127.0.0.1" requested by the login. The login failed.
b) In image 2 main config, I changed hostname as server IP (using ping <hostname> in jump host) and retry. It failed with error message
Cannot open server "127.0.0.1" requested by the login. The login failed.
c) In image 2 main config, I tried to use random IP address in host and click "Test connection". It failed with error message
The TCP/IP connection to the host 127.0.0.1, port 45851 has failed. Error: "The driver received an unexpected pre-login response. Verify the connection properties and check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. This driver can be used only with SQL Server 2005 or later.".
What am I missing?
dbeaver ssh tunnel config
dbeaver main config
We have got the same issue.
Azure SQL Database needs to know the instance name associated to your username. Since you are using an ssh tunnel on 127.0.0.1, Azure can't know the name of the instance. You need to add the database name to your sql login (not the one used for the jumpbox, but the one used to connect to the db):
username#database_name.database.windows.net
Instead of
username

Oracle 12c : Connecting through remote machine as SYSDBA user throws error ORA: 01017

I have installed Oracle 12c with one pluggable database namely RHQDDBPDB.
I am successfully able to connect to my container database and pluggable database as sysdba through SQL developer on my DB server
I have created one user rhqddbpdbadmin on my pluggable database RHQDDBPDB with sysdba role. I am able to connect to pluggable database with this user as sysdba.
The problem that I am facing is as follows:
When connecting to the Container or Pluggable database through SQLPLUS from another machine as sysdba, I am getting error ORA-01017.
However from remote machine, if I connect with rhqddbpdbadmin user as Normal (without sysdba), then connection is successfull.
Commands i am using from remote machine:
sqlplus rhqddbpdbadmin/xxxxxx#rhqddbpdb as sysdba
Throws error ORA - 01017
sqlplus rhqddbpdbadmin/xxxxxx#rhqddbpdb
Connected successfully.
Please help.
Thanks for your time.
Connecting as sysdba from a remote location (over tcp or tcps) requires some extra steps:
Set the database parameter REMOTE_LOGIN_PASSWORDFILE = { shared | exclusive | none }.It should be set tp shared/exclusive.
Check your password file under $ORACLE_HOME/dbs/, which is being used for authentication when users login to the database as a sysdba. If the password file does not exist then create a new one (using orapwd) and set the password.

Accessing an external remote postgres database using pgadmin4 from a local machine produce password authentication fail

I am trying to connecting to a remote database with pgadmin4 using putty to portforward so I can connect to a local database on a remote server. This works normally like a charme.
I switched computer and set up the database setting and putty the same. (db: pgpass.conf on old maching with copy&paste to new db connection setting in pgadmin4 and a configuration file export/import for putty - that is 1:1 transfair).
When trying to connect to the remote local database, on the old computer it still works and on the new one i get this error message:
FATAL: password authentication failed for user "postgres" FATAL:
password authentication failed for user "postgres"
On Windows 10 I don't find the password file? Is there any? What is wrong with the setting in pgadmin4?
Found the solution, I don't have SSL so I have to disable it, and the connection is established.
Go to the servers properties, select the tab Connection go to SSL mode and choose Disable - finally Save it

Connect to MySQL remote host using SQLyog

is there any way to connect to a remote database by using SQLyog? I have the ip address, user name and password of the database. However, I have 'Error 2203 - Can't connect to MySQL server on '[myIpAddress]' (10060)'` whenever I test connection in SQLyog.
It means there is no direct access to database ..
You can check by telnet to port 3306 from destination address.
You can connect to MySQL remotely using SSH, if the remote MySQL connection is not enabled. Please check the following screenshots:

access Database with HeidiSql like PHPMyAdmin (localhost)

is it possible to access a Database with HeidiSql like PHPMyAdmin, if the DB is only reachable over the web (localhost-Settings).
Yes, HeidiSQl is the BEST FREE mysql client on Windows.
You can follow this steps:
STEP1: Create a session, Network type choice "MySQL (SSH tunnel)". Hostname/IP as "localhost".
User as "yourmysqllocaluser", so was Password.
STEP2: Select SSH tunnel tab, choice your plink.exe location. SSH host+port use "Remote IP address" and port. Username as "Remote Linux ssh login user", so was Password. If you use Putty Pagent+ssh KEY, then leave the Password field and Private key file blank!
STEP3(IMPORTANT): Use your putty.exe access the Remote IP address, it will prompt a ssh access grant window. Be sure to choice "YES".
STEP4: Back to HeidiSQL, select session and open. Enjoy it as local.
If you havn't do STEP3, open session will occour error.
Since quite a few releases, HeidiSQL natively supports SSH tunnel connections. Just select network type MySQL (SSH tunnel) in your session, and set up putty in the upcoming SSH tunnel tab.
This is documented in detail on http://www.heidisql.com/help.php#connecting

Resources