Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tcp instead of socket for db scripts #66

Merged
merged 1 commit into from
Sep 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ import-osm-data-to-postgres:
exit 1; \
fi && \
chmod +r development/hungary-latest.osm.pbf && \
sudo --user postgres osm2pgsql --slim --create --database gis development/hungary-latest.osm.pbf
PGPASSWORD="${postgresql-password}" osm2pgsql \
--host localhost --port 5432 \
--user osmhu --database gis \
--slim --create development/hungary-latest.osm.pbf


.PHONY: mysql-drop-db
Expand All @@ -173,12 +176,14 @@ mysql-create-db:

.PHONY: mysql-init-empty
mysql-init-empty:
MYSQL_PWD="$(mysql-password)" mysql --user osmhu osm_hu < db/mysql/mysql-create-tables.sql
MYSQL_PWD="$(mysql-password)" mysql --host 127.0.0.1 \
--user osmhu osm_hu < db/mysql/mysql-create-tables.sql


.PHONY: mysql-import-existing
mysql-import-existing:
MYSQL_PWD="$(mysql-password)" mysql --user osmhu osm_hu < db/mysql/mysql-dump.sql
MYSQL_PWD="$(mysql-password)" mysql --host 127.0.0.1 \
--user osmhu osm_hu < db/mysql/mysql-dump.sql


.PHONY: convert-postgres-to-mysql
Expand All @@ -188,7 +193,8 @@ convert-postgres-to-mysql:

.PHONY: mysql-dump
mysql-dump:
MYSQL_PWD="$(mysql-password)" mysqldump --user osmhu --skip-extended-insert \
MYSQL_PWD="$(mysql-password)" mysqldump --host 127.0.0.1 \
--user osmhu --skip-extended-insert \
--no-tablespaces osm_hu > db/mysql/mysql-dump_`date +%Y-%m-%d_%H%M%S`.sql


Expand Down
Loading