I am trying to connect to firebird(embedded version) with Flask-SQLAlchemy but I keep geting the error :
sqlalchemy.exc.DatabaseError: (fdb.fbcore.DatabaseError) ('Error while connecting to database:\n- SQLCODE: -902\n- Unable to complete network request to host "127.0.0.1".\n- Failed to establish a connection.', -902, 335544721)
My connection variable is:
SQLALCHEMY_DATABASE_URI ='firebird://sysdba:masterkey#127.0.0.1:3050/' + os.path.join(basedir, 'data.gdb')
I also tried with localhost, same error.
Any clue what I am doing wrong?
This is on Windows 7 using firebird 2.5 ,Flask-SQLAlchemy 2.0 and SQLAlchemy==1.0.3
I also tried without supplying a username password since it's the embedded verion, still not working
SQLALCHEMY_DATABASE_URI ='firebird://127.0.0.1:3050/' + os.path.join(basedir, 'data.gdb')
I had same error until I changed value of SQLALCHEMY_DATABASE_URI to firebird+fdb://login_on_firebird:password_on_firebird#localhost:3050/ + os.path.join(basedir, 'data.gdb'). Also, you need to create the special user on firebird server
Related
I am new to RDS, this is the first time i'm trying to connect MySQL Workbench to a remote DBMS so i'm not sure where is the problem.
What i want to do : connect workbench to rds so i can add manually data to my database ( i would prefer to do it with a GUI )
PS :
Useful informations : The RDS database was created by Elastic Beanstalk from a jar file (spring boot) i uploaded.
What is the problem : workbench can't connect to rds and tells me "unable to connect to localhost" when it is clearly a remote server.
The error message returned after a test connection
What i tried to fix the issue :
Check the connection informations : all of them are correct : i am using TCP/IP connection
Check the accessibility : the server is public
Edit Inbound rules : the server is accepting all incoming requests
Try other GUI : DBeaver faailed with this error : " Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not
received any packets from the server. " : unknown host
What i want to know :
What can cause this issue ? Why is Workbench refering to my server as localhost when it is not ? Is there any logging system for RDS/Workbench i can use for further investigations ?
Is there any alternatives for my need ?
Thank you for your help !
I just connected to my RDS instance using MySQL workbench.
Your issue sounds like an inbound rule issue. To rule that out, double check your rule that lets all traffic in. Once you determine that is the cause, you can change it.
Also, make sure that you specify the endpoint in your login screen and have correctly set the password and user name.
Thank you for your answer smac2020!
I do think you are right! I tried to connect to the database with SSH connection to my EC2 instance and it worked.
Conclusion : i can access the db from inside my vpc but not from the outside despite the db is public and the inbound are correct (i think they are).
I'm trying to figure out what the issue may be, i will post if i succeed in correcting it.
Note for people trying to access using SSH (and myself for later) :
there are the tutos i used to connect workbench :
Add the SSH pairs : https://www.youtube.com/watch?v=G4SXNHuGM8A
Connect to db with SSH over EC2 : https://www.youtube.com/watch?v=gM7JvNMOUQM
I was creating a very large table using a python data set in the Mysql server, which I today realized was beyond the server's capacity.
Post which I am unable to connect to the server
I get the following error when I try to establish a connection on the MySQL workbench, I also get something similar when I try the same on python using MySQL connector
Following is a screenshot of the error
I tried setting up a new connection as follows, but I receive the same error:
I tried this solution, which is similar but I keep getting the following error
'mysql' is not recognized as an internal or external command,
operable program or batch file.
Is there any other way I can connect, or if there is anything I have to do before I can connect?
127.0.0.1 this server not get . Try to reconnect in another address..
I am able to connect to SQL EXPRESS USING local but I am unable to connect using machine name. I wanted to test remote connection . I tried to restart the services but it is not helping .
It gives error 26
Also, if I use the pc-name using windows authentication it works fine but if I use SQL Server authentication it fails with error 18456 . So it looks to be issue with specific user which works fine with local but not with pc-name while doing SQL Server Authentication ( I have already checked and confirmed that both windows and sql server authentication is enabled )
Any suggestions ?
It seems to be issue with user properties. It is fixed now . Thanks.
Having difficulty connecting to AWS MySQL database in a new Scala Play Slick application. I can connect to the database from MySQL Workbench.
application.conf contains:
db.default.user=myusername
db.default.password=mypassword
db.default.driver=com.mysql.jdbc.Driver
The problem may be in db.default.url=
The MySQL Workbench copy JDBC connection string command yields:
"jdbc:mysql://sperch-dev.coafgaprx2uf.us-east-1.rds.amazonaws.com:3306/?user=myusername"
Including the "user=" here as MySQL Workbench suggests seems redundant with db.default.user and anyway I get the error message "[SQLException: No database selected]" with or without it.
Having seen elsewhere the pattern for db.default.url as:
"jdbc:mysql://localhost:3306/DATABASENAME?characterEncoding=UTF-8"
I tried adding the database name:
"jdbc:mysql://sperch-dev.coafgaprx2uf.us-east-1.rds.amazonaws.com:3306/sperch-dev?characterEncoding=UTF-8"
That however generates the error message:
"Cannot connect to database [default]"
My db.default.user and db.default.password are the same as the working connection in MySQL Workbench.
Any suggestions?
Remove the Port number and user name from the db.default url. Below is an example of what works.
# Database configuration
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://your-rds-instance.us-west-1.rds.amazonaws.com/DATABASE_SCHEMA_HERE"
db.default.user=user
db.default.pass="password"
I am using Delphi xe2 and I would like to know qhat this error is and by what means I need to get around this, I am attempting to connect my database application to a wamp server through a LAN connection and I seem to have the Hostname username password and port correct but when I attempt to log into the MySQL database I get this error:
(Exception EZSQLExeption in module VDB1.exe at 002A7A5C. SQL Error:
Host'My-PC' is not allowed to connect to this MySQL server)
Could you please give me a way to get around this? Thanks.
The error message states:
Host 'My-PC' is not allowed to connect to this MySQL server
And this would indicate that the SQL server is blocking your client based on its host name, 'My-PC'. So, you need to configure your MySQL server to allow connections from that host.