Closed ameinabdi closed 5 years ago
Hi @ameinabdi, there is the orm.config.ts where is stored db information. For dev it will be always sqlite created on app startup.
thanks @amanganiello90 i have added my info about database in that file but i still it doesn't work so did you test sql before now ?
What db have you choosen in the related question?
mysql
What command are you using to startup application? Write in order the commands.
jhipster --blueprint nodejs
That command is for generation.. I said about startup.. however for mysql prod db, the connection created is:
ormconfig = {
name: 'default',
type: 'mysql',
url: 'mysql://localhost:27017/<your-app-name>,
synchronize: true,
logging: false,
entities: [__dirname + '/domain/*.entity{.ts,.js}'],
};
Change url with your mysql instance.
i run this command inside the server folder npm start
i run this command inside the server folder npm start
Ok, so you are using sqlite dev db, not mysql.. paste in your server/src/orm.config.ts the orm.config.ts content
but i don't need to use sqlite. i need to use mysql database
Then, replace in the if of Prod section the mysql source configuration and run:
set NODE_ENV=prod&&npm start
Please attention that in your db instance must be created the 3 user management tables, otherwise the initial db seed insert fails.
To disable it comment this line
okey thanks a lot mr @amanganiello90
How can read about sql db connection?
when i select mysql database i got this error to start project