Last active
March 5, 2020 20:56
-
-
Save MicrowaveDev/ec5835c07aac6d4fd95a754959d5ab16 to your computer and use it in GitHub Desktop.
Mysql to Postgres migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
createdb my_database | |
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" | |
sudo apt install pgloader | |
mysql -uroot -proot -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" | |
pgloader --with "quote identifiers" mysql://root:root@localhost/my_database postgresql:///my_database | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment