Working on same database from 2 diffent pc's - mysql

I had a Question about working on the same MySQL database. If I am in college I am always working on my laptop. But if I get home than I rather use my PC for coding.
But I don't wanna import and export my database always. I just wanna connect to a server or something so I can work from both.
Is there any way to do that with a VPS or something? I don't mind to make one with Linux or windows but what is the easiest way to work from 2 different devices and what do I need to do to make that happen.

Install MySQL on your laptop.
Copy/move the database onto it. Use the laptop as your server when you get home.
If you don't want your laptop on all the time, use a cheap web host to share it over the t'interwebs.
If you like, look at AWS free tier. Finally, Zapier do a MySQL & OneDrive collaboration that could do what you want.

Related

Architecture - Code locally (GIT), Database in the Cloud

We are a small team of developer who are looking for the ideal working environment.
Our current setup:
Everyone is developing locally on his machine. Code is managed/shared with git (bitbucket). We have a small mysql server in our local network where we all share the same database throughout the projects. If we want to share something with a client, we have a remote server where we move the code and database to.
Our preferred setup:
Code stays where it is. But we would like to move the SQL databases into the cloud to a remote server which we can access locally.
What we've tried:
Amazon RDS (free tier) which uses the smallest instance. This was horribly slow. Question here is, does it get really fast for a bigger instance? Page loads can't take 5 seconds for only the database requests. What instance do we theoretically need in order to have a really good performance?
Google SQL was honestly also too slow. I actually tested a bigger instance which was a lot better than Amazon but still not useful for our usecase.
Do you know any other services which provide such functionality? (MySQL remotely accessible)
Do you have any suggestions how we maybe can rethink our whole process of developing?

MySQL Databases Online

I recently downloaded the community version of MySQL. I'm relatively new to databases and all so I may have some misconceptions about databases. However, based on my understanding, the database downloaded is local to my computer, so if my computer ever gets destroyed or wiped then the databases is not accessible anymore and cannot be referenced by programs.
If this is the case, is there a way to make the database not local to my computer, but based online so that it will always be accessible regardless of the condition of my computer?
EDIT: It would be best if the database was free if possible. In addition, I have no host accounts currently.
If you are running the database on your machine, then true - if the computer gets wiped or destroyed, so does your database and data.
If you want online, then Amazon Web Services (AWS) is probably your best bet. You create an RDS there, and it lives in the cloud. Not for the faint of heart. Not that it is particularly difficult, but probably not for the novice.
I also had the same problem and the solution came from here
All the free hosters i found with mySQL were way too limited and 99% didn't gave you remote connections.
So you set up a free VPS ...a nice linux distro,you install the mySQL and off you go...

Remote desktop connection conundrum

i may be going about this the wrong way and would appreciate guidance on how it should be done. :)
I have a windows 7 computer on which i have installed thinVNC (Remote desktop application)
i liked it because its cross platform and does not need the clients to install anything on their devices to connect to the computer.They simply use a HTML 5 enabled browser to connect.
The purpose of this is so that they can get to a Microsoft access database on the computer, log in to it and perform some transactions.
Now, when one person logs in they see the desktop and interact with it and thats fine. However, when another person connects to the computer, they basically watch as the first user goes about using the database. Which i think is the purpose of this kind of software!
So i guess what i want is that each user gets their own fresh "session" if you like, like having the file on a network drive. So users connect to the computer,don't see others using the system and there's a folder where i have granted access to external users and placed the database in it. They will then doubleclick the file icon and be able to login etc.
So what is the best way to achieve this? ideally i don't want the user to have to install any software to be able to connect, but if its unavoidable then so be it.
thanks
Why not use Microsoft's built in remote desktop? There's a version for most (if not all) devices now and it would let you just setup multiple accounts on the Win 7 pc and get each user to log into them individually.

Dropbox Syncing Databases Corruptly

I use Dropbox for syncing my databases through my Macs(iMac & MBA). And also I've MAMP setup on both of my Macs.
It all works well except that when I create a MySQL database on my MBA for a Wordpress project of mine and then try to view the site on my iMac, I get the Wordpress installation screen even though I've successfully built the Wordpress project on my MBA before switching to my iMac.
After checking the database under my iMac, I saw that it was corrupted. The database was there but non of the tables were accessible. Then I switched back to my MBA and checked the same database there as well and it wasn't corrupted at all. It was all working fine and I was able to use the Wordpress project.
Therefore I built a test Wordpress project under my MBA again to check the database syncing and the exact same problem above happened again.
But the interesting thing is that when I start building a project on my iMac and then switch to my MBA, it all works fine in both machines.
It's really weird. Any ideas?
My first thought is line endings (or something similar). Could windows by using only /n while IOS (which is *nix based) be using /r/n ?
Another issue could be file permissions... windows is much more loose in relation to this. Do an LS with the appropriate flags and check if an execute (or some other permission) is missing.
Finally, I'd suggest you do the following:
Make one setup on windows, and one setup on mac (in 2 separate folders) containing the exact same data (etc) in the databases.
Then get a diff program (diffmerge, diff, beyond compare, etc), and compare the files to see what is different.

Server for mobile feed app (like Instagram, Twitter...)?

I've made a mobile native app with a feed system like Instagram/Twitter. In development mode I was just running a PHP/MySQL Apache local server, but now I need to publish the app and work with a real server. Which kind of server do I need? I just need to send http requests (JSON), loads of them!
Do I just need a hosting server like 1and1? (http://www.1and1.com/linux-web-hosting?__lf=Static)
But this one, it only has 1GB MySQL databases... not enough
Is there any kind of app/server whatever? Which kind of server does Instagram use?
These days lots of users are moving to the cloud.
Check out Amazon EC2: http://aws.amazon.com/ec2/
You can setup a micro instance server and it is very cheap to run tests on and get off the ground. Then if you like how it's running, you can simply upgrade to a more powerful server without having to re-install everything.
It also allows you to scale if your application gets really popular by just cloning the server.
Really worth checking out.