S
S
Sergey2019-07-27 13:29:46
MySQL
Sergey, 2019-07-27 13:29:46

How to correctly transfer the database to gitHub?

Good afternoon. Wrote a small application in angularjs. The main data is loaded from a database that is stored in the openServer folder. The application itself is deployed through it. Now I am connecting to the database via PHP:

<?php
$db = mysqli_connect('localhost', 'root', '', 'angularjs') or die('Ошибка соединения!');
mysqli_set_charset($db, 'utf8') or die ('Не установлена кодировка!');

How do I modify the code to put the project on the git. Task: to enable the downloader of the project to immediately launch it. Apparently, you need to place the database in the project folder and change the path in the PHP file, but on the other hand, it still won’t work without a virtual server. What practices exist.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Derepko, 2019-07-27
@Banjamin

You can post a core data dump
www.ihp.sinica.edu.tw/dashboard/docs/backup-restor...

A
Alexey Skobkin, 2019-07-27
@skobkin

If you need to get a structure and a little bit of basic data, migrations and fixtures can help.
If you need to fill in a huge pile of data, then a dump is already easier.
You can automate deployment using Docker Compose.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question