Info Security Memo
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org

Build Confidence

Focusing on Information Security 

Info Security Notes

Free Internet Online Database

3/22/2023

0 Comments

 
Free Internet Online Database

There are some free database hosting services provided by some online company or organizations. This post collects some popular ones and compares them quickly with some personal notes. 




Free Database Hosting Online

 Free MySQL Databases:
  • https://db4free.net/
    • a testing environment
    • no more than 200MB data
    • one MySQL DB
    • phpMyAdmin
  • https://remotemysql.com/  - connection failed, no space (March 17 2023)
    • Instant activation.
    • Free 100MB database size.
    • phpMyAdmin
    • No query limits.
    • Unlimited bandwidth.
    • Suitable for testing/develoment use only.
  • https://www.freesqldatabase.com/
    • 1 DB
    • DB space starting from 5MB
    • phpMyAdmin
    • Multiple server locations
    • Instant account activation
    • Remote connections allowed
  • https://freedb.tech/
    • MySQL 8 DB
    • PhpMyAdmin
    • One DB, 50MB storage
    • Only for testing
    • No root access

Free Postgres DB
  • https://supabase.com/ - Supabase is an open source Firebase alternative. Start your project with a Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, and Storage.
  • Firebase: https://console.firebase.google.com/  - The Firebase Realtime Database is a cloud-hosted NoSQL database that lets you store and sync data between your users in realtime. NEW: Cloud Firestore enables you to store, sync and query app data at global scale.


Following section is coming from https://webphpmyadmin.com/

Allow Remote Connections to MySQL


Allowing connections to a remote MySQL server is set up in 3 steps:


  1. Edit MySQL config file
  2. Configure firewall
  3. Connect to remote MySQL server

Step 1: Edit MySQL Config File

1.1 Access mysqld.cnf File

Use your preferred text editor to open the mysqld.cnf file. This example uses the nano text editor in Ubuntu 18.04. Enter the following command in your command-line interface to access the MySQL server configuration file:
command
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
The location of the file may vary based on the distribution and version in use. If the MySQL configuration file is not it its default location try using the Linux find command to detect it.

1.2 Change Bind-Address IP

You now have access to the MySQL server configuration file. Scroll down to the bind-address line and change the IP address. The current default IP is set to 127.0.0.1. This IP limits MySQL connections to the local machine.
The new IP should match the address of the machine that needs to access the MySQL server remotely. For example, if you bind MySQL to 0.0.0.0, then any machine that reaches the MySQL server can also connect with it. For this website to access it you need to use IP address 212.47.237.65
Once you make the necessary changes, save and exit the configuration file.

Note: Remote access is additionally verified by using the correct credentials and user parameters you have defined for your MySQL users.

1.3 Restart MySQL Service

Apply the changes made to the MySQL config file by restarting the MySQL service:
command
sudo systemctl restart mysql
Next, your current firewall settings need to be adjusted to allow traffic to the default MySQL port.

Step 2: Set up Firewall to Allow Remote MySQL Connection

While editing the configuration file, you probably observed that the default MySQL port is 3306. This is default MySQL port number but can be changed in the config file.

If you have already configured a firewall on your MySQL server, you need to open traffic for this specific port. Follow the instructions below that correspond to your firewall service in use.

Option 1: UFW (Uncomplicated Firewall)

UFW is the default firewall tool in Ubuntu. In a terminal window, type the following command, changing remote_ip_address to the required IP address, to allow traffic top the IP and port:
command
sudo ufw allow from remote_ip_address to any port 3306
The system confirms that the rules were successfully updated. Firewall rule added to firewall deamon.

Option 2: FirewallD

The firewalld management tool in CentOS uses zones to dictate what traffic is to be allowed.
Create a new zone to set the rules for the MySQL server traffic. The name of the zone in our example is mysqlrule, and we used the IP address from our previous example 212.47.237.65:
command
sudo firewall-cmd --new-zone=mysqlrule --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --permanent --zone=mysqlrule --add-source=212.47.237.65
sudo firewall-cmd --permanent --zone=mysqlrule --add-port=3306/tcp
sudo firewall-cmd --reload
You have successfully opened port 3306 on your firewall.

Option 3: Open Port 3306 with iptables

The iptables utility is available on most Linux distributions by default. Type the following command to open MySQL port 3306 to unrestricted traffic:
command
sudo iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
To limit access to a specific IP address, use the following command instead:
command
sudo iptables -A INPUT -p tcp -s 212.47.237.65 --dport 3306 -j ACCEPT
This command grants access to 212.47.237.65. You would need to substitute it with the IP for your remote connection.
It is necessary to save the changes made to the iptables rules. In an Ubuntu-based distribution type the following commands:
command
sudo netfilter-persistent save
sudo netfilter-persistent reload
Type the ensuing command to save the new iptables rules in CentOS:
command
service iptables save

Step 3: Connect to Remote MySQL Server

Your remote server is now ready to accept connections. You can now use this site to connect to your MySQL databases, using your server IP, username and password.


How to Grant Remote Access to New MySQL Database?

If you do not have any databases yet, you can easily create a database by typing the following command in your MySQL shell:
command
CREATE DATABASE ‘yourDB’;
To grant remote user access to a specific database:
command
GRANT ALL PRIVILEGES ON yourDB.* TO user1@’212.47.237.65’ IDENTIFIED BY ‘password1’;
The name of the database, the username, remote IP, and password need to match the information you want to use for the remote connection.

How to Grant Remote Access to Existing MySQL Database

Granting remote access to a user for an existing database requires a set of two commands:
command
update db set Host=’212.47.237.65' where Db='yourDB';
update user set Host=’212.47.237.65' where user='user1';
User1 is now able to access yourDB from a remote location identified by the IP 212.47.237.65.




References






via Blogger http://blog.51sec.org/2023/03/free-internet-online-database.html
March 21, 2023 at 10:25PM Blog
0 Comments



Leave a Reply.

    Categories

    All
    Architecture
    Blog
    Checkpoint
    Cisco
    Cloud
    CyberArk
    F5
    Fortigate
    Guardium
    Juniper
    Linux
    Network
    Others
    Palo Alto
    Qualys
    Raspberry Pi
    Security
    SIEM
    Software
    Vmware
    VPN
    Wireless

    Archives

    March 2024
    February 2024
    January 2024
    December 2023
    November 2023
    October 2023
    September 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    October 2019
    September 2019
    June 2019
    July 2018
    May 2018
    December 2017
    August 2017
    April 2017
    March 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015

    Print Page:

    RSS Feed

    Email Subscribe
Powered by Create your own unique website with customizable templates.
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org