sudo apt update
sudo apt install mysql-server
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
- in that file, add
secure-file-priv=""
systemctl status mysql
sudo mysql
CREATE DATABASE gambit_gallery
USE gambit_gallery
- paste the DDL Commands from DatabaseDesign.md
- load data using the following command:
load data infile '/path/to/cs411/fa24-cs411-team074-floor/data fixed_MyTable.csv' into table MyTable fields terminated by ',' lines terminated by '\r\n'
(Vars, @vNullVar, MoreVars)
set NullVar = nullif(@vNullVar, "NULL")
;
- Connect to db Set password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
Connect
mysql -u "root" -p "root"
connection = connection.MySQLConnection(
user="root",
password="root",
database="gambit_gallery"
)
Start:
sudo /etc/init.d/mysql start
Stop:
sudo /etc/init.d/mysql stop
Restart / reload configs:
sudo /etc/init.d/mysql restart
Check run status:
sudo /etc/init.d/mysql status
First, ssh into the VM. (you'll only be able to if you're added). You can do it though command line or vs code.
When you're in, please work in the
/home/shared
directory ty
ssh my_username@35.208.175.145
- install
remote-ssh
extension - edit ssh config file and add this entry below:
Host gambit-gallery-vm
HostName 35.208.175.145
User my_username
After connecting to the GCP VM, connect to the database using MySQL
mysql -h 34.41.165.201 -u root -p
- it will ask you for a password (ask me, i dont want it on the internet)
sudo shutdown -h now
- go into gcloud :(
git clone the repo url
cd into gambit gallery folder
navigate to backend folder of project
python3 -m venv venv
source venv/bin/activate
pip install Flask flask-cors
python app.py
navigate to frontend folder of project
npm install
ng serve
python app.py (from backend folder)
ng serve (from frontend folder)
hf :)