Unable to connect Mysql router using sqoop - sqoop

I am unable to connect Mysql router using sqoop and getting below error.
how to connect MySQL router 8 using sqoop.
while connect i am using router host and router port.
Command:
sqoop eval
--connect jdbc:mysql://xxxxxx:8976/abcde
--driver com.mysql.cj.jdbc.Driver
--username "aabbcc"
--password "qq2211ddff"
--query "select * from fffgggsss limit 5"
Details:
mysql server: 8.0.16
mysql router version: 8.0.16
sqoop version: 1.4.6.2.6.5.115-3
20/11/18 18:06:31 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
20/11/18 18:06:32 WARN tool.EvalSqlTool: SQL exception executing statement: java.sql.SQLException: Access denied for user 'aabbcc'#'xxxxxxx' (using password: YES)

Related

Oracle database connection via Codeingniter 4

Hi I have a Oracle database installed locally on my laptop. I'd like to connect to it via Codeigniter 4. Since version 4.2.0 it is able to do so.
https://codeigniter4.github.io/CodeIgniter4/changelogs/v4.2.0.html
All my database credentials are in the .env file, but I'm unable to establish connection. I'm new to Oracle.
I can connect to my database via Oracle SQL Developer.
The data I use for the connection:
host: localhost
port: 1521
user: system
password: MYPASSWORD
service name: orcl
How can I use that in my .env file?
This is what I have so far:
database.default.hostname = localhost
database.default.database =
database.default.username = system
database.default.password = MYPASSWORD
database.default.DBDriver = oci8
database.default.DBPrefix =
database.default.port = 1521
I get this error:
Unable to connect to the database.
Main connection [oci8]: oci_connect(): ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
(.env file)
Try using:
database.default.hostname = '127.0.0.1:1521/orcl'
Where:
'127.0.0.1:1521/orcl', // hostname:db_port/service_name

how to connect Redshift from putty?

I am trying to connect redshift from my local windows putty instance. After creating Redshift instance , it is generated leader and compute node ip address.
Question is
which node role i need to pick ? Compute / Leader
for those which ip address i need to pick ? private / public
How to add public SSH key into my local putty?
You cannot SSH into a Redshift cluster since Redshift is a fully managed data warehouse service. All cluster administration is done by the Redshift service.
To connect to the Redshift database from the command line you use psql. This is installed as part of a Postgres installation. Any version of Postgres or psql later than 8.0 should work.
Alternatively you can connect using any SQL tool that support JDBC or ODBC.
You would normally connect to the Endpoint address but, if needed, you can also connect to the Leader node IP address.
psql -h my-cluster-name.ahashvalue.us-west-2.redshift.amazonaws.com -p 5439 -d mydatabasename -U masteruser
Or
psql -h 54.nnn.nnn.nnn -p 5439 -d mydatabasename -U masteruser

AWS DocumentDB through Proxy

I have an AWS DocumentDB set up that I can connect to just fine through my jump box using:
mongo --ssl --host aws-host:27017 --sslCAFile rds-combined-ca-bundle.pem --username my_user --password <insertYourPassword>
I'd like to be able to connect to it through localhost for some testing. I cannot connect directly so I attempted to open a tunnel from my jump:
ssh -i ~/.ssh/my-key user#my_jump -L 27017:aws-host:27017 -N
After that I tried the basic MongoDB connect command:
mongo --ssl --host localhost:27017 --sslCAFile rds-combined-ca-bundle.pem --username my_user --password <insertYourPassword>
I get an error I understand:
The server certificate does not match the host name. Hostname: localhost does not match SAN(s)
I tried using export http_proxy to use http://my_jump:27017 and using the command above again with no luck.
Any suggestions or help on how to connect?
Try to disable ssl hostname validation:
mongo --ssl --sslAllowInvalidHostnames ...
Note --sslAllowInvalidHostnames is available from version 3.0.
If this does not work, try to remove --ssl entirely from the connection options, as according to the documentation:
The mongo shell verifies that the hostname (specified in --host option
or the connection string) matches the SAN (or, if SAN is not present,
the CN) in the certificate presented by the mongod or mongos. If SAN
is present, mongo does not match against the CN. If the hostname does
not match the SAN (or CN), the mongo shell will fail to connect.

Installing Laravel with a database on another system

We have a local network, in the server's system I install SQL Server 2017, now I must install Laravel in my system with the server's database but I got this error
Connection failed: SQLSTATE[08001]: [Microsoft][ODBC Driver 13 for SQL Server]SQL Server Network Interfaces: Connection string is not valid [87].
my config
SQL Host : DESKTOP-Q03NUTO\LS
SQL Port : 1707
SQL Login: sa
SQL Password: ***

I can't connect to mysqlfabric

I can't connect to mysqlfabric on port 32275.
I am connecting on port 3306 to database so all the grants are in place . On port 32275 I get a message
ERROR 1044 (42000): [Fabric] Access denied
for user and in log I can see
[INFO] 1441810699.948011 - MySQL-RPC-Session-4 - User 'john'
denied access which suggests permissions issue.
I can log in to database if I use
mysql -u fabric -p -h localhost -P 32275
but if I use
mysql -u fabric -p -h host-ip-address -P 32275
I get above error. I can see in netstat that server is listening on that port.
What am I doing wrong ?
There are a couple of things to check in the fabric config.
Firstly try disabling RPC authenication until you have it up and running.
[protocol.xmlrpc]
disable_authentication = no
Also check your storage section and test you can connect using these settings.
[storage]
address = 192.168.0.1:3306
user = fabric_store
password = secret
database = mysql_fabric
auth_plugin = mysql_native_password
mysql -u fabric -psecret -h 192.168.0.1 -P 3306 fabric_store

Resources