Nestjs Sequelize Docker Database does not exists - exception

Im new to nestjs and trying to use docker container.
My Problem is that I'm using sequelize and I'm trying to create a new database if database does not exist. I'm getting this error:
[Nest] 1 - 04/28/2022, 12:48:36 PM ERROR [SequelizeModule] Unable to connect to the database. Retrying (1)...
SequelizeConnectionError: database "remote-io" does not exist
I know database not exist and when I get this error I want to create new database, but I dont know where this error generated and how can I interact with this error. Please help me.

Related

Symfony - App uses wrong database name, CLI uses the correct one

hoping to get help with possibly a silly problem. I can't get Symfony to connect to the correct database.
My config line in .env is as follows
DATABASE_URL="mysql://root:root#127.0.0.1:3306/main?serverVersion=mariadb-10.4.27"
Creating a database using CLI works just fine and the database named "main" is created
bin/console doctrine:database:create
Created database `main` for connection named default
Running migration works OK and a table is created in the database
bin/console doctrine:migrations:migrate
WARNING! You are about to execute a migration in database "main" that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
> yes
[notice] Migrating up to DoctrineMigrations\Version20230117183120
[notice] finished in 28.6ms, used 22M memory, 2 migrations executed, 3 sql queries
Yet, when I try to access the site from the browser I get the following error
An exception occurred in the driver: SQLSTATE[HY000] [1049] Unknown database 'root'
Clearing the cache doesn't seem to help, I don't see any reference in the code to a database named root. Any clues on how to make Symfony to connect to the "main" database?
Cheers
P.

How do I add MySQL database to icCube?

I am new to icCube and I need to add MySQL database as a data source. But every time I try to do it, icCube fails to establish connection:
Failed to establish the connection due to the error: JDBC connection for url 'jdbc:mysql://localhost:3306/foodmart' and user 'root' cannot be created due to error 'Could not create connection to database server.'
I am pretty sure I'm making a very dumb mistake, but as I mentioned before, I'm new and cannot figure it out. Here are the screenshots of
what I type in and my MySQL connection

Talend MySQl Database error

I am trying to create a new database connection in talend studio and it is showing me this error:
Connection failure. You must change your database settings.
I have configured MySQl installer and also I have searched about this error and saw some answers but neither of them were clear, how can I fix this problem.
The exception thrown says that Talend was unable to connect to the database "demo". Try to create a database with the name "demo" with another SQL tool before connecting to it with talend.

Xampp-Mysql-Eclipse connection error

I have installed eclipse and xampp in my mac and tried to connect with mysql server from eclipse using mysql-5.7.9-osx10.10-x86_64 connector.
I have the user "root#localhost" granted with all privileges to all databases.
1) I'm able to connect only mysql database in phpmyadmin server.
Unable to connect any other database. Am getting an error :
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown
database 'test'
2)After connecting with mysql database using
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql","root","1234");
I created a table adminlogins in mysql database, and used command
"select * from mysql.adminlogins"
but I am getting an error
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
'mysql.adminlogins' doesn't exist.
I have tried all possible ways creating new user and granting all permissions. I am unable to figure out where am going wrong please some help me with this.
mysql database is reserved for system use. It is not recommended to create your own tables there. That said, the cause of your error is that the table was not created where you think it was if it was created at all.
Regardless, try creating the table in another database. If it does not work, post the exact commands that you used to create it with the messages that were returned.

Getting error when creating connection to MySQL server driver

I installed MySQL server and I also test this server by creating user data base userlist table and also check that it is working fine on command line as I previously done. But This time getting error when try to create a user.
I already used this but actauly I format my system and creating connection again. But this time getting error.