import psycopg2
try:
conn = psycopg2.connect(
dbname="DATABASE_ID",
user="USERNAME",
password="PASSWORD",
host="phonesql.com",
port="25432"
)
cur = conn.cursor()
print(cur.execute("SELECT * FROM your_table LIMIT 10"))
rows = cur.fetchall()
for row in rows:
print(row)
cur.close()
conn.close()
except psycopg2.OperationalError as e:
print(f"Could not connect to the database: {e}")
The Power of SQL, Right on Your Phone
Everything You Need for Your Data
Effortless Database Management
Manage your databases with ease through a clean and intuitive interface.
Secure On-Device Storage
Your data remains secure and private, stored locally on your phone.
Monetize Your Data
Monetize your data by publishing SQLite databases for subscribers. Share your insights and get rewarded.
Securely Connect Your Apps
Let third-party apps access data safely with user consent, powered by our robust OAuth2 implementation.
Isolated Workspaces
Keep your projects organized and secure with isolated workspaces for your data and sessions.
Automatic Backups & Refreshes
Ensure your data is always safe and up-to-date with automatic cloud backups and data refreshes.
Powerful Proxy
Connect to your mobile database from any client with our powerful proxy, supporting Websocket, HTTP, and the Postgres wire protocol.
No Vendor Lock-in
Your data is yours. Stored in standard SQLite files, you can export or download it at any time.
Client-Side Encryption (Upcoming)
You can choose to encrypt backup data directly on your phone before it's stored in the cloud. This ensures that only you can access it.
Built for Developers
curl --request POST \'https://phonesql.com:20080/api\' \
--user "USERNAME:PASSWORD" \
--header \'Content-Type: application/json\' \
--data \'{
"database": "DATABASE_ID",
"queries": [
{
"id": "query-id-1",
"sql": "SELECT * FROM your_table LIMIT 10"
}
]
}\'
Pricing
Basic
- 5GB Cloud Storage
- 5GB Download & 5GB Upload
- All Features
Standard
- 50GB Cloud Storage
- 50GB Download & 50GB Upload
- All Features
Premium
- 500GB Cloud Storage
- 500GB Download & 500GB Upload
- All Features
- Priority Email Support
Enterprise
- Private cluster
- Custom Cloud Storage
- Custom Authentication
- Setup and support
Note: All subscriptions are securely processed as in-app purchases through the Apple App Store or Google Play Store.
FAQ
Is PhoneSQL free to use?
Yes, the core features of PhoneSQL are completely free, with no ads or hidden costs. We offer optional subscription plans for cloud storage, which allow you to back up your data, share it with others, and publish it for a wider audience. You can store as much data as you need on your phone for free.
Which platforms are supported?
PhoneSQL is available for both iOS and Android. While we offer some cloud management features, our focus is on a phone-first experience, ensuring your data is securely stored and accessed directly from your device.
Where is my data stored?
Your data is stored locally on your phone by default. If you choose to enable cloud backups, your backup files are securely stored in the AWS (Amazon Web Services) Mumbai datacenter.
How can I get help?
For any questions or assistance, feel free to email us directly at admin [at] premsan [dot] com or use the contact page.