I'm building an iPhone app which uses the sqlite3 library - are there any special requirements for hosting the database itself since its using sqlite3? Can I host it on one of my GoDaddy accounts for example? I get like 25 free databases with my current account with them but I'm just wondering if the SQL databases they can host will work or if they need to be sqlite3 format specifically...
any ideas?
You should save the database file to the Library/Caches folder instead of hosting it online, unless you have a specific reason to keep it online.
Related
This is on several MacBook Pros and iMac, all running Monterey (OSX 12.3)
I would like to store a readonly postgres database on my Dropbox, so that I can use access it from multiple computers. I realize storing a writeable database is unworkable, but I'm not trying to do that.
I created a database under /Users/me/Dropbox/dbs on my MacBook Pro. But the other machines don't see the contents of the directory.
I figured it was because postgres has a different UID on the various machines, so I tried doing chown -R me:staff on the db database directory on the MacBook Pro. That made the directories and their contents visible in the Dropbox on the other machines, but I can't start postgres on the MacBook Pro (haven't tried elsewhere yet), because of file permissions, even after making the complained of file go=rx. I'm thinking since the file is in group=staff and not in postgres that's not going to work.
Any ideas? For example: can I create the database as me:staff, rather and postgres:postgres?
Like Laurenz says, this is never going to work properly. The closest you could get I suspect is some foreign data wrapper to the read-only shared directory. That's not going to provide the experience you are looking for I suspect though.
The SQLite wrapper might be your best bet. Store the shared data in SQLite and access it through PG. https://github.com/pgspider/sqlite_fdw
PostgreSQL is not Microsoft Access, it is a relational database with a client-server architecture. It works by starting the database server on the data directory and then connecting to the server process with a client. You can only run a single instance of the database server on a single data directory, and that is all you need, since many clients can connect to the server at the same time. The database directory has to be writable by the server and indeed is modified, even if you only perform read operations in the database.
I'm working on trying to setup my local database with some mock data to work with. We have a development AWS account with a postgres database. I would like to create a backup of it, export it to my local computer, and restore to my local postgres database.
I've been trying to find how to do this online, but everything I'm finding is on how to backup to AWS and to restore back to AWS. I tried creating a snapshot and exporting it via S3 - but the snapshot doesn't produce a sql file to restore from like I was expecting.
If anyone can point me in the right direction I would very much appreciate it :)
I am afraid that the only chance you have is pg_dump/pg_restore.
Even if Amazon lets you get your hands on its file system backups, which I doubt, they may be of little use to you, since Amazon runs modified versions of PostgreSQL and you cannot be sure that the physical file format is identical to PostgreSQL.
I am working on SSIS and get trouble with POSTGres.
Because I need to build a command text from variables, so that I have to use the Ole DB Datasource to retrieve data from a Postgres server.
I have search alot pages in internet but not found any good provider (it is not reasonable with fee granted tool such as Devard :(, Postgres is free, it's drivers and provider should be free also).
Does someone can give me a hand on this?
Thanks
Good day,
Currently I use MS Access at home for several Databases (for personal use).
At work, I use PostgreSQL, which is infinity times better. I want to start using postgres for my personally used databases, but I don't know where to start.
I've tried reading the documentation, but still don't know how to start. I don't have a server at home; is it possible I can just make a local database/tablespace? Or would I have to host a virtual server?
Note that I am willing to use other open source databases if there is an easy option out there - MS access is just so... terrible.
Thanks,
So, it seems you have Windows at home. You just need to download full installer for PostgreSQL:
http://www.postgresql.org/download/windows/
After installation it will automatically add starting postgres server as a service on local machine. That means, server will always run in background, but you can disable that later, or just uninstall.
After that, you can use pgAdmin (included in default installation package) or other client tools to access the DB engine.
UPD in pgadmin, create connection with this settings:
'localhost' as hostname;
port - 5432;
user, database - postgres (for testing purpose only - you should create your own user and tables with restricted rights later).
Password for postgres (that is DB admin user) must be entered during installation process.
Server settings are stored somewhere here:
"C:\Program Files\PostgreSQL\9.3\data"
pg_hba.conf - Client Authentication Configuration File
postgresql.conf - Configuration File
Two developers often share the same system, and both have local copies of the project and try to connect to a local database. Both users can see the database, but tables and their data are only visible to the database's original author.
We've tried giving all permissions to both users, but it seems the only thing that works is to duplicate the database.
Is there a way around this?
Thanks in advance!
You would probably be better off hosting a separate MySQL instance on it's own machine, and then configure your code to connect to that database instead of the MAMP-hosted one. That being said, you will need to open the port on the firewall of the MAMP(0) for the MAMP-MySQL (usually port 8889). Then, the script on the MAMP(1) needs to be configured to connect to MAMP(0) database on the newly opened port.
You will also need to GRANT privileges for user(1) on the MAMP-host(0) database.
A connect string from MAMP(1) would look like:
$db_url = 'mysqli://user:password#mamp0.local:8889/es_forms_drupal';
Hopefully that makes some sense.