SQLAlchemy, how to transition from single-user to multi-user

421 views Asked by At

I wrote a database program using SQLAlchemy. So far, I've been using FreeFileSync to sync the database file over the network for two computers when necessary. I want to learn how to set things up so that the file stays in one place and allows multiple user access but I don't know where to begin.

Is it possible to open and read/write to a SQLAlchemy database on another computer over a network? I couldn't find information on this (or maybe I just don't understand the terminology)?

Are there any courses or topics I should look into that I will be able to apply with Python and SQLAlchemy?

Or would making a web-based program be the best solution? I'm good at algorithms and scientific programming but I'm still a novice at network and web programming. I appreciate any tips on where to start.

1

There are 1 answers

0
user6811 On BEST ANSWER

I can't delete this question outright, so I will answer it with what I did.

Part of the problem was that I was trying to find a solution for moving a sqlite3 database to a server, but it turns out that sqlite3 is only intended for use in simpler local situations. So I decided to migrate to MySQL. The following are the major steps:

  1. I took an old computer that has XP and installed Lubuntu 14.04 as the default OS.
  2. Installed MySQL on Lubuntu: sudo apt-get install mysql-server.
  3. Edit the etc/mysql/my.cnf document's bind-address to match the computers network address.
  4. On the client computer with Python 2.7 installed PyMySQL: easy_install PyMySQL

Works great. Now I'm in the process of making sure the program watches for changes to the database and updates the GUI accordingly.