Mayank0255 / Stackoverflow-Clone-Frontend

Clone project of a famous Q/A website for developers built using MySQL, Express, React, Node, Sequelize :globe_with_meridians:

Home Page:https://stackoverflow-clone-client.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble Setting up MySQL

priyanshu-kun opened this issue · comments

Hey! I'm facing issues to setup database locally cause I never use SQL database before ''m only use mongodb But I know mySQL syntax. Will you tell me step by step how do I setup db locally?

Okay, so,

  1. Install MySQL to your local machine.
  2. Check if you are able to connect to the mysql client with your credentials or not.
  3. If you are able to connect to it then create a .env file in the project folder and set it up in the same format as in .env.example. Add your personal mysql credentials to their respective places in your .env file.
  4. After that just follow the instructions mentioned in guidelines written.

If you have trouble running the .sql scripts then just open up your mysql client and then run the two scripts with their respective file paths like

source <file path>

@priyanshuSharma-WebDev did this help?

i have some trouble with running the backend ( i think it has something to do with the env). What would be the host value in the .env for example? How do i know what mine is?

edit: nvm, i set it to 127.0.0.1 and it now works without error

Great to hear that, though it can also be 'localhost'

@priyanshuSharma-WebDev should I close the issue then?

Yeah! It's work, Now I'm ready to familiarize myself with codebase.

One more thing! Have you ever try to make a real time collaboration webapp ex: google docs cause I want to make something like this?

Yeah! It's work, Now I'm ready to familiarize myself with codebase.

Great, I am glad to hear that and am looking forward to some really cool contributions from your side 😄.

One more thing! Have you ever try to make a real time collaboration webapp ex: google docs cause I want to make something like this?

I haven't done anything like that up till now, though I have worked a little with Web Sockets for a chat application