Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login mysql on gitpod

Tags:

mysql

gitpod

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"

like image 683
Junior Chang Avatar asked Nov 14 '25 11:11

Junior Chang


1 Answers

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';"
like image 103
Adam LaCombe Avatar answered Nov 17 '25 10:11

Adam LaCombe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!