Jump to content

Syncing MySQL between computers?

Go to solution Solved by StackUnderflow,

mysqldump -u root -ppassword databasename > databasename.sql

Transfer the .sql file to ubuntu and

mysql -u root -ppassword

create database databasename;

exit

mysql -u root -ppassword databasename < databasename.sql

 

For more, google mysqldump.

Hey there,

 

I am developing a Ruby on Rails application, for a school project. I have been developing all of the app so far on my laptop, and I have been using Git (and bitbucket), as version control (My first time, so still learning).

Today I tried cloning the project to my Ubuntu Gnome desktop, and all the project files was cloning perfectly.

 

Anyhow, the App can not find the database I created on my laptop, so how do I sync the MySQL databases?

 

Thanks :-)

Link to comment
https://linustechtips.com/topic/509228-syncing-mysql-between-computers/
Share on other sites

Link to post
Share on other sites

mysqldump -u root -ppassword databasename > databasename.sql

Transfer the .sql file to ubuntu and

mysql -u root -ppassword

create database databasename;

exit

mysql -u root -ppassword databasename < databasename.sql

 

For more, google mysqldump.

Link to post
Share on other sites

Is the database open to the internet?

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to post
Share on other sites

mysqldump -u root -ppassword databasename > databasename.sql

Transfer the .sql file to ubuntu and

mysql -u root -ppassword

create database databasename;

exit

mysql -u root -ppassword databasename < databasename.sql

 

For more, google mysqldump.

You sir,

 

Are awesome :-)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×