I am trying to setup zabbix with two database , one on localhost and another on diffrent machine.
zabbix server: 192.168.0.100
external database :192.168.0.154
I setup zabbix with localhostdatabaase and its working perfectly,Then I created sql dump file and put it in external database ie,192.168.0.154, but when I change the database ip in zabbix frontend PHP file it gives me permission denied,Ihave created all the required user in external database ie, zabbix#192.168.0.100
and assigned it all the permission still its giving permission denied error, also I have edited zabbix_server.conf file. please help struggling from past 3 days.
I had this problem on local databases. All I need to do was disabling selinux, configure firewall and change permissions to /var/lib/mysql/mysql.socket.
But in logs I had info about problem with this socket.
Related
I am very new to both aws ec2 instances and postgresql. I was able to get a database up and working for a web application mainly using the phppgadmin interface. Today I was working on my web app and was abruptly disconnected from the database. In my web app I got the error " pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?" I now can't log in to phppg admin or connect to postgres from my ec2 instance command line. After inspecting the log file at /var/log/postgresql/postgresql-12-main.log I am seeing the error "FATAL: could not open file "global/pg_filenode.map": Permission denied" followed by "LOG: abnormal database system shutdown" I have my pg_hba.conf and postgresql.conf files are configured correctly as I have been doing work on this database for a few days now. Any help would be appreciated.
You or something else wrecked your PostgreSQL installation by changing permissions on or ownership of PostgreSQL files. On Windows and its interesting concepts of file locking, I'd suspect an anti-virus program, but you seem to be running some kind of Unix. Little more can be said with the little information in the question.
I need to connect to a remote database (Oracle) using a MS SQL Server (2019) linked server. What I did so far:
Installed Oracle Instant Client x64 and the ODBC drivers on the machine where the SQL server is running
Created a symlink to the central TNSNAMES.ORA (on a file share in the network) inside the Oracle Instant client folder.
Set the necessary environment variables
Created an ODBC connection to the database on the Oracle server on this machine
Restarted MS SQL Server
Created a linked server (Microsoft OLEDB Provider for ODBC Drivers) in the SQL instance
When connecting to the SQL Server using sqlcmd on this machine (I did not install SSMS there), I can query the linked database using OPENQUERY(). I can also read the file TNSNAMES.ORA using this command (note, the given file is the symlink, but it displays the contents of the linked file, as it should):
SELECT * FROM OPENROWSET(BULK 'C:\InstantClientx64\tnsnames.ora', SINGLE_CLOB) TNSNames
So far, everything is fine.
Now, when I connect to the SQL Server from my workstation using SSMS, i get the following error when trying to read TNSNAMES.ORA using the command above:
Cannot bulk load because the file "C:\InstantClientx64\tnsnames.ora" could not be opened. Operating system error code 5(Access is denied.).
I created a file test.txt in the instant client folder containing something like "Am I allowed to read this?" - and I was, no problems.
I started procmon on the server to find out what happens. When using the above command on the SQL server, I get a REPARSE (because it's a link!), and then SUCCESS, the file is displayed in the sqlcmd console.
When using this command in SSMS (on my local workstation), first appears the REPARSE (OK), then ACCESS DENIED.
In both cases it is the same user account which is displayed as "Impersonating" in the procmon's details. There is definitely no problem with a firewall, and the read permissions on the tnsnames.ora file on the network share are granted for Everyone. I am also able to create an ODBC item on the local workstation, and can connect and query the database from here.
I have done this in the past I don't know how often, and never had problems. What am I missing?
Why are you trying to read the tnsnames.ora file via SQL? The Oracle libraries will (should) internally open it and use it when your app connects to the DB.
The default location for network config files is shown in the Instant Client installation doc. In your case it will be C:\InstantClientx64\network\admin. Unless you have set the TNS_ADMIN variable, then start by creating this subdirectory and putting tnsnames.ora in it.
(A future version of Instant Client on Windows will create the network\admin subdirectory automatically, similar to the way it is created with the Linux Instant Client packages).
In my Azure portal I created the resource "Azure Database for PostgreSQL server". I set up the firewall to enable two Virtual Networks (in order to allow the correct functioning of two applications) and the IP address of my local computer (in order to be able to work on the database using DBeaver as client). This has worked for several months although, since I have a dynamic IP address, I often have to change the enabled address. Now I'm trying to update it but, when I try to connect to the database via DBeaver, I get the following error:
FATAL: no pg_hba.conf entry for host "XX.XX.XX.XX", user "myuser", database "mydatabase", SSL on
where "XX.XX.XX.XX" is exactly the IP address I have enabled in Azure.
I tried to install a second Client (pgAdmin) but I get the same error. Also, since my applications that use the database seem to work properly, I tried to verify the connection data that I use in DBeaver (host, database, user, password) but they are all correct.
In Azure, in the "Connection security" tab of my database (see image below) I read the following warning:
Some network environments may not report the actual public-facing IP address needed to access your server. Contact your network administrator if adding your IP address does not allow access to your server.
So changing the IP address has no effect? How can I solve the problem?
I solved the problem by restarting the database: https://learn.microsoft.com/en-us/azure/postgresql/howto-restart-server-portal
In the Azure Portal change require_secure_transport from server parameters to OFF.
make ssl connection non mandatory in server parameters for postgres service in azure, its dynamic parameter so no postgres service restart not required
or fix/configure application to use secure(ssl) connections only
I am new to SAP HANA database. I have successfully hosted the SAP HANA express database on cloud server. I have created a database and I am able to query it for the CLI.
However I have trouble connecting it from eclipse have spent two days on the same.
I am following https://developers.sap.com/india/tutorials/hxe-howto-eclipse.html tutorial.
Please Note :
I am able to connect to server using RDP and putty so the IP address is correct
I have started the database using command:
hdbsql -i 90 -d HXE -u SYSTEM -p SAPhxe123
why is eclipse taking port 39015 by default in last screenshot? is this the issue or can we change this.
Any help here would be much appreciated!
Remove the port and just keep HXE for the tenant.
39015 is the right one for the first tenant in an AWS or Azure VM (39017 is for Docker).
Try connecting to the system database first. If that works but the tenant doesn't, check this: https://developers.sap.com/tutorials/hxe-gcp-eclipse-tenant-connect.html
If that doesn't work: https://blogs.sap.com/2018/02/24/troubleshooting-connection-problems-for-hana-express/
Unless you explicitly closed port 22, ping should respond.
Also a reminder that HANA studio is part of a set of deprecated tools so if you are looking to learn native development, I would recommend going for XS advanced.
Could you please refer to following document: https://developers.sap.com/tutorials/mlb-hxe-tools-sql-eclipse.html
There the tenant database connection is created as follows
The host server (IP) is maintained in hosts file
Additionally the tenant db is only provided as HXE without port number
If you running the HANA server as a container.
Go in to the container "docker exec -it bash
HDB info
What is the port that you can connect to (If the Port is 39041 for example)
Rerun your container mapping your docker run command with -p:. That is (-p 3901:39015).
Essentially what is broken is that the port Eclipse HANA studio is trying to connect to is not mapped to the HANA port that is listening on.
You have to map the PORT that HANA is listening to Host PORT 39015.
If this is a cloud env you have to do the appropriate port forwarding.
Tested this and it works now.
For tenant database, I think it is enough to use HXE
Did you try to change the host name by adding the port information after IP address?
When your HXE instance was created on AWS, did you assigned it the default security group or did create one based on "Seller settings"?
This is really important because without this custom security group you won't be able to access your instance from the outside world.
Please refer to the following tutorial for more details: https://developers.sap.com/canada/tutorials/hxe-aws-setup.html
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