Introduction
“Connect2SQL is the ultimate MySQL, Microsoft SQL, Sybase, and PosgreSQL client for Android.” Source
If you want to use SQL on the go using your Android phone, you can download Connect2SQL from Google play store.
This tutorial will only cover the steps to using Connect2SQL to connect to MySQL server (for example: on your PC).
Step 1
Step 2
CREATE USER 'AndroidPhone'@'192.168.1.1' IDENTIFIED BY 'password';
The ‘192.168.1.1’ should be replaced with your PC’s IP address.Now type the following to grant your phone the permission to access your MySQL server:
GRANT ALL PRIVILEGES ON *.* TO AndroidPhone@'192.168.1.1';
…and this will grant your phone the privilege to access MySQL remotely.
Step 3
On your phone, fire up Connect2SQL and tap the + sign:
Step 4
Tap MySQL:
Step 5
- The connection name you want
- The host IP address. In this tutorial, it is 192.168.1.1
- The port number. You should leave the default port number (3306) unless you use a different port number for MySQL server, in which case you need to change it
- The username. In this tutorial, it is AndroidPhone
- The password. In this tutorial, it is password
The ADDITIONAL OPTIONS section allows you to automatically choose the database you specify once you are connected. If you use, for example “customerDB” too often, then you can enter customerDB in the “database” field to USE that database immediately every time you connect.
Step 6
Entered settings:
Step 7
Tap “TEST” at the top right and it should ping the server successfully:
Step 8
Tap “SAVE” and that should take you back to the saved connections. Tap on the connection you just created and it should take you to the SQL editor:
Happy querying!
Thank you for reading.
References
For those interested, we have a major update of this app now open-sourced under DevLife Apps.
Please update and feel free to contribute.
https://devlife.app
LikeLike