I started a fresh project using gitpod. I did the regular npm init and I'm using express, hbs. On my terminal, when I entered "mysql -u root" It says "bash: mysql: command not found"
Asked
Active
Viewed 1,207 times
3
-
1I've also tried yarn add mysql after that. It couldn't work either – Junior Chang Oct 21 '21 at 23:07
1 Answers
2
You'll need to install mysql first. Try using a custom docker image - gitpod/workspace-mysql
File: .gitpod.yml
image:
file: .gitpod.dockerfile
File: .gitpod.dockerfile
FROM gitpod/workspace-mysql
You'll likely need to create a user with a password for your application to connect.
mysql -e "CREATE DATABASE my_db;"
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root_password';"
Adam LaCombe
- 149
- 2
- 4