Firebird connection ODBC remote when using non-standard TCP port - ssis

I have a server with Firebird 2.5.3 and I need read then database on another server over the ODBC connection for use in SSIS project(integration services), so I shared the folder with the .FDB database and set the address in my ODBC connection, but doesn't works.
My file firebird.conf:
# ----------------------------
# TCP Protocol Settings
#
# The TCP Service name/Port number to be used for client database
# connections.
#
# It is only necessary to change one of the entries, not both. The
# order of precendence is the 'RemoteServiceName' (if an entry is
# found in the 'services.' file) then the 'RemoteServicePort'.
#
# Type: string, integer
#
RemoteServiceName = fb_db
RemoteServicePort = 5050
I try:
Without port:
192.168.100.21:C:\IntegracaoRH\CONSISANET2_5.FDB and
With :
192.168.100.21:5050:C:\IntegracaoRH\CONSISANET2_5.FDB and same error.
How to make remote ODBC connection?

According to the configuration you posted, your Firebird instance is running on port 5050, however when you don't specify a port in the connection string, then the Firebird client will default to port 3050.
To use the right port, you need to explicitly specify the port in your connection string, by using format <host>/<port>:<db-path-or-alias>.
In other words, something like:
192.168.100.21/5050:database-alias
Where database-alias should be the alias or the path of your database.
Be aware, Firebird on Windows supports URLs of the form \\<host>\<db-path-or-alias> using the WNET protocol. However my guess would be that you navigated to the UNC-path \\192.168.100.21\IntegracaoRH\CONSISANET2_5.FDB. There is no 1-on-1 correspondence between an UNC-path and a Firebird WNET-url: they look the same, but they are not the same thing. The 'Browse' button in the ODBC configuration should only be used to select databases local to your machine.
As an aside, being able to browse to an UNC-path \\192.168.100.21\IntegracaoRH\CONSISANET2_5.FDB suggests that your database is in a folder shared to the network. You shouldn't share databases over the network through a fileshare. It is insecure, as anybody with access can create a copy of the database and access it with full permissions, or even replace or otherwise damage the database. Access to the database should always be done through a Firebird server on the same host as the database file.

Related

MySQL server -- how to set up TLS? Certificates not being read from location in .my.cnf

I've set up MySQL to be accessible by TLS authenticated connections only. However, when attempting to access the connection to the server,
having specified the [client] connection in .my.cnf on the client the connection fails to use them to authenticate
but if they are not specified in /my.cnf but just dumped (as they were before) in /etc/ssl/certs/ then the connection picks them up.
The guide I've been working through is https://openvpn.net/vpn-server-resources/configuration-database-management-and-backups/#create-ssl-connection-to-mysql using the on-prem stream. However to test it explicitly I've been connecting from the host at the command line. I've been consulting https://dev.mysql.com/doc/refman/5.7/en/using-encrypted-connections.html
I've confirmed that the connection uses the certificates using \s in MySQL from the connection at the command line. However I don't know how I can force the certificates to be the specified ones in .my.cnf, to make the deployment explicit. So the question is explicitly: Why is MySQL picking up the certificates automatically yet can't when they are specified in .my.cnf.

Alternative to port 5432 for connecting two PostgreSQL Databases?

We need to query and pull data from our client's remote PostgreSQL database and ultimately import it into a table in our MySQL database. Due to security concerns, our client is unwilling to open access via the default port 5432 so we can do this. We have considered possible setting up a PostgreSQL database on our end and trying to connect with that, but we don't know if that will give us any more flexibility.
The question is, is there an alternative port other than 5432 that we can have our client open up so we can access?
Configure PostgreSQL server to accept connections from a specific IP + authentication, without changing default port. This normally should be done even for local connections.
Configure router/firewall to do port forwarding (i.e. firewall:port9999 --> postgresql_server_ip:port5432) + add source_ip as another layer of "security"

Connect a Centura client application to SQL Server

I am new to Centura application configuration
When I try opening the windows client application, which has the Centura sql.ini configuration file. I get the below error.
Can anyone please help me understand the issue?
Error code: 401
Reason: FOR SQLBASE: The specified database cannot be found. SQLBase cannot find the file named "x:\dbdir\dbname\dbname.DBS" where x:\dbdir is either the default, c:\SQLBASE, or modified with the DBDIR SQL.INI configuration keyword. In a multiuser network configuration, this error indicates that your network is working correctly, but the database system was unable to locate the specified database filename.
FOR NON-SQLBASE DATABASES: This problem can also occur with a SQLGateway when leaving out the protocol type in the SERVERNAME parameter that the client uses to communicate with the gateway (like SQLNBIOS).
For example, SERVERNAME=SERVER33,SQLQUEUE DBNAME=DB2DBMS, SQLQUEUE, SQLNBIOS
will not allow a remote client process (using SQLNBIOS on the LAN to communicate with the SQLGateway machine) to connect to the SQLGateway machine.
For SPX connectivity from DOS or MS Windows to a Unixware SQLBase Server check for the omission of the "serverpath=..." parameter in the SQL.INI file under the client section.
Remedy: Verify the database file exists. The default drive letter and dbdirname is c:\SQLBASE unless overridden with a DBDIR SQL.INI configuration keyword parameter. Verify the DBDIR keyword is not missing or pointing to a wrong database directory. Verify the DBNAME keyword is specified for the named database. Verify the SERVER keyword is not missing or conflicting with other network server names. In your CONFIG.SYS file, verify at least 40 files set with the FILES=40 parameter. If the server was being initialized while the connection was tried, retry the connection after the server has initialized. If all of the above fails, try using a different database name or try connecting to the database in single user mode at the same machine. If you can connect with a local engine it probably indicates a network configuration error exists. If you can connect with a new database name it probably indicates a previously named database was never properly initialized.

Access MySQL server from Grails

I like to setup a dedicated MySQL server in a LAN accessible from other computers of this network. How can I setup the database server and the clients?
How can a Grails application can access the MySQL from the same LAN?
If your MySQL server is going to run on Windows then you can configure it with the installation program. For example, I downloaded the install file mysql-installer-community-5.6.20.0.msi (versions change quickly) and it offers the option of installing just the server:
Just follow the screen prompts and take all the default values (strongly recommended). The main values to remember are:
The default network port number 3306.
The server's ip address.
The username(s) and password(s) that you created that have access to
MySQL.
Then I suggest you download HeidiSQL and configure a connection to your new MySQL server, that way you can manage your database server remotely:
Hope that helps.
You are asking 2 differents questions.
To set up mysql connection in your grails app, did you at least try to read the doc ?
http://grails.org/doc/latest/guide/single.html#dataSource
It's just a jdbc connection string :
https://www.google.fr/?gws_rd=ssl#q=jdbc+mysql+connection+string+example
It's more than just the JDBC connect string. You won't get far without a driver, so uncomment the sample entry in BuildConfig.groovy in the dependencies section and update the version to the most recent:
dependencies {
...
runtime 'mysql:mysql-connector-java:5.1.34'
}
Set the driverClassName in DataSource.groovy, along with the correct JDBC url for your database. Replace <server> with the server name or IP address, and <dbname> with the correct database name. You will likely also want to add parameters at the end of the url in the querystring. And if the port is non-standard (3306 is the default) then add that in also. To ensure that you use INNODB tables (older versions of MySQL default to MyISAM), specify the MySQL5InnoDBDialect (or a subclass):
dataSource {
...
driverClassName = 'com.mysql.jdbc.Driver'
dialect = org.hibernate.dialect.MySQL5InnoDBDialect
url = 'jdbc:mysql://<server>/<dbname>'
}
Run grails compile to download the driver jar and setup the classpath.

MySQL does not work on localhost without Local Area Connection

I use WampServer (Apache, PHP, MySQL) and have no problems when some kind of network adapter(wireless or lan) is connected (i.e. Local Area Connection has status connected) even if i am not connected to the internet (for example when i am connected to the router but that is not connected to the internet).
When there is no network connection, I get a php error like MySQL could not connect to 127.0.0.1 on port 3306.
Interestingly, telnet 127.0.0.1 3306 says that it could not connect to the port, even when the server and MySQL are running fine (i.e. when some kind of local area connection is connected).
So I turned off all kinds of firewall (antivirus and Windows) but still no difference in anything. And that is why this issue is quite puzzling.
Things I have already tried (will update this list along the way):
The skip-networking directive in my.ini.
You could modify your MySQL server and client configuration to connect to one another using a named pipe instead of a TCP/IP loopback connection. That way, the current state of the network connection should have less impact.
To do so, start the server with --enable-named-pipe or the corresponding config file setting, and execute the client with --pipe or --protocol=PIPE. Similar configurations should be available for your PHP connector as well. It may depend on which library you use there, and whether or not it will take the mentioned configuration settings from the my.ini file (settings without leading -- there).