Reputation: 45
npx sequelize db:create
i was trying to do create "sequelize-cli": "^6.6.2" version but i got
also this is error
mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) "development": { "username": "root", "password": "", "database": "Flights_Search_DB_DEV", "host": "127.0.0.1", "dialect": "mysql" },
expecting to create db with sequelize cli
Upvotes: 0
Views: 47
Reputation: 54
Check if you're running mysql, maybe it's turned off
Try running mysql
in terminal or if you're on Windows find mysql service and see if its running.
Username and password should also be correct to successfully connect to the database
If you forgot your password (happened to me a few times) then see below
You should create init txt file with sql command (in the link) then start mysql with this file, instructions here:
https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password
Upvotes: 0