Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A remote MySQL database runs on a different host from your website or application server, or on a managed database service in the cloud. Moving the database can free CPU, memory, and disk I/O on a busy web server, but it does not guarantee faster pages. Network round-trip time, query design, indexes, caching, and connection pooling determine whether the change helps.

The safest production design is a private network or VPC connection, a firewall rule that permits MySQL only from the application host, a database account restricted to that host, and TLS for the database connection. The procedure below covers a self-managed Ubuntu pair and managed alternatives such as Amazon RDS for MySQL and DigitalOcean managed MySQL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a remote MySQL database is—and when it improves performance

In a single-server installation, Nginx or another web server, application code, and MySQL compete for the same CPU cores, memory, storage bandwidth, and operating-system resources. A remote arrangement places MySQL on another server or uses a managed database service. The application still sends SQL over a network, but database work is isolated from web requests.

What separation can improve

  • Resource contention: MySQL can use its own memory buffer pool and disk I/O instead of competing with PHP, Node.js, background jobs, or web-server processes.
  • Independent scaling: You can resize the database without changing the web tier, or add application servers while keeping one database endpoint.
  • Operational isolation: Database backups, maintenance, monitoring, and failover can be managed independently of web-server deployments.

Why a remote database can also be slower

Every query now crosses a network. A page that makes many small, sequential queries may spend more time waiting for round trips than it did with a local socket. A poorly indexed query, an oversized result set, or opening a new connection for every request can erase any benefit from moving MySQL.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

There is no universal percentage speed gain from moving MySQL to another host. Treat the move as a capacity and reliability change, then measure representative requests before and after. Record database query latency, network round-trip time, active connections, connection errors, cache hit rates, CPU, memory pressure, disk I/O, and page response time.

Choose the network and deployment model first

Private network or VPC (the normal production choice)

Put the application server and database on the same private network, VPC, or equivalent isolated network. The database listens on its private address, and the network firewall or security group allows TCP port 3306 only from the application host or its security group. The database need not have a public address.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Public-address connection (use only when required)

If the hosts cannot share a private network, MySQL can listen on a public address. In that case, restrict the firewall to the web server’s fixed public IP, require TLS, and monitor authentication failures. Never open port 3306 to the entire internet. A public address also introduces more exposure and often more variable latency.

Self-managed server or managed service

Decision area Self-managed Ubuntu/MySQL Amazon RDS for MySQL DigitalOcean managed MySQL
Host control Full operating-system and MySQL configuration access. No shell, SSH, Telnet, or Windows Remote Desktop access to the database host; configuration is exposed through the service controls. Managed cluster controls and documented API/CLI operations; host-level access is not equivalent to a VPS.
Network placement Choose private or public addressing and configure the firewall yourself. AWS recommends a private DB instance in a VPC with an application host such as EC2. Use the provider’s private networking features where available and restrict inbound access to the application.
Backups and failover You design, schedule, verify, and restore backups; failover is your responsibility. Backups or snapshots, Multi-AZ secondaries, read replicas, and performance monitoring are available as service features. Managed-cluster backup, high-availability, migration, and performance features are documented by the provider; exact options depend on cluster configuration.
Scaling Resize the server or build replication manually. Resize the instance and add read replicas through the service. Resize and manage cluster options through the service controls.
Price Not stated; depends on server size, storage, backups, and administration time. Not stated; depends on region, instance class, storage, backups, and availability configuration. Not stated; depends on cluster size, region, storage, and high-availability choices.

Managed services trade some host-level control for provisioning, monitoring, backups, resizing, and high-availability capabilities. A self-managed server can be less expensive or more configurable for a small, experienced operations team, but the team owns patching, recovery testing, and failover.

Prerequisites for a self-managed Ubuntu setup

DigitalOcean’s Ubuntu procedure assumes two servers: a web server and a database server. Each should have a sudo-capable non-root account and UFW enabled. The web server needs Nginx and PHP (or your application’s equivalent runtime); the database server needs MySQL.

  • A stable private IP for each server. In the examples below, 10.0.1.10 is the database server and 10.0.1.20 is the web server.
  • Permission to edit MySQL configuration and firewall rules on the database host.
  • A tested backup and restore process before moving production traffic.
  • An application setting that can separate database host, port, database name, username, and password.
  • A maintenance window or rollback plan for the cutover.

Set up MySQL on a separate Ubuntu server

1. Install MySQL and verify the service

On the database server, update packages and install MySQL:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo apt update
sudo apt install mysql-server
sudo systemctl enable --now mysql
sudo systemctl status mysql

Keep the database server’s operating system and MySQL packages maintained. Do not perform the rest of the configuration as a remote root login; use your sudo-capable account.

2. Bind MySQL to the correct address

Most MySQL installations accept only local connections by default. Edit the MySQL server configuration, commonly /etc/mysql/mysql.conf.d/mysqld.cnf on Ubuntu:

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

Set bind-address to the database server’s private address:

bind-address = 10.0.1.10

Binding to 0.0.0.0 listens on every interface and is broader than necessary. If you must use a public address, bind deliberately and compensate with strict firewall rules and TLS. Restart MySQL and confirm that it is listening:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl restart mysql
sudo ss -ltnp | grep 3306

The address used here must match the network path you intend to use. If MySQL listens on a private address, the application account and firewall should be based on the web server’s private IP. If it listens publicly, use the web server’s public IP and restrict the rule tightly.

3. Allow only the web server through UFW

On the database server, allow TCP 3306 from the web server’s private address and deny other sources:

sudo ufw allow from 10.0.1.20 to any port 3306 proto tcp
sudo ufw status numbered

Do not use an unrestricted rule such as sudo ufw allow 3306/tcp on a production database. If your provider supplies a cloud firewall or security group, create the same source restriction there; both layers should agree.

4. Create the application database and least-privilege accounts

Open the local MySQL administrative client:

sudo mysql

Create the schema and an account whose host part is the web server’s exact private IP:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
CREATE DATABASE appdb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'app_user'@'10.0.1.20' IDENTIFIED BY 'use-a-long-random-password';
GRANT SELECT, INSERT, UPDATE, DELETE ON appdb.* TO 'app_user'@'10.0.1.20';

The 'user'@'host' pair matters. A user created as 'app_user'@'localhost' is not the same account as 'app_user'@'10.0.1.20'. Create a separate migration or administration account if the application needs schema changes; do not give the runtime account unrestricted global privileges merely to make deployment convenient.

For an application whose private address changes, use a controlled private subnet rule only when necessary and compensate with the network firewall. Avoid a wildcard host such as 'app_user'@'%' unless you fully understand the exposure and have an additional, narrowly scoped network control.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Exit the client with exit. MySQL applies CREATE USER and GRANT immediately; a separate FLUSH PRIVILEGES is not required for these statements.

5. Require encrypted connections where appropriate

For private networks with strong isolation, encryption requirements depend on your threat model and provider. For public paths, require TLS. Modern MySQL clients can request encrypted transport with an option such as:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mysql --host=10.0.1.10 --port=3306 --user=app_user --password --ssl-mode=REQUIRED appdb

Use certificate verification in a production implementation when your client and server certificates are managed. Confirm the exact TLS settings supported by your Ubuntu and MySQL versions rather than assuming that an encrypted option alone validates the server identity.

6. Test from the web server

Install a MySQL client on the web server if one is not already present, then connect over the same route the application will use:

sudo apt update
sudo apt install mysql-client
mysql --host=10.0.1.10 --port=3306 --user=app_user --password appdb

After entering the password, run a harmless query such as SELECT 1;. If the connection fails, test in this order: DNS or IP reachability, the database listener, the cloud firewall and UFW rule, the MySQL account’s host restriction, and the password. A timeout normally indicates routing or firewall problems; an immediate access-denied error usually indicates credentials or the account host.

7. Point the application to the remote host

Change the application’s database settings from a local socket or localhost to the database server’s private DNS name or IP. Set all five values explicitly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Host: the private DNS name or 10.0.1.10.
  • Port: 3306, unless you deliberately changed it.
  • Database: appdb.
  • Username: app_user.
  • Password: the account’s long random secret.

For WordPress, enter the remote host details in wp-config.php, including the host and port in the form supported by your WordPress installation. For other frameworks, prefer environment variables or a secret manager rather than placing credentials in a publicly served file. Restart the application workers after changing configuration so they do not retain old connection settings.

8. Migrate data and cut over

Take a consistent backup of the original database, restore it to the remote server, and verify row counts or application checks before switching traffic. A typical logical migration uses a transaction-consistent dump for InnoDB tables, but the exact command and options depend on MySQL versions, table engines, size, and downtime requirements.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
  1. Put the application in maintenance or read-only mode if you cannot tolerate writes during the final copy.
  2. Export the source database and transfer the dump over an encrypted channel.
  3. Import into appdb on the remote host.
  4. Run application smoke tests against the remote database.
  5. Change the application configuration and restart workers.
  6. Watch errors, latency, connections, and replication or backup status during the rollback window.

Keep the original database untouched until the new endpoint has passed your recovery and functional checks.

Configure Amazon RDS for MySQL

AWS’s getting-started topology places a private RDS DB instance in a VPC and an application host such as EC2 in that VPC. Create or select a subnet group, choose the MySQL engine and instance size, set storage and backup options, and attach a security group that allows inbound MySQL traffic only from the application host’s security group.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Connect with the RDS endpoint

After provisioning, AWS states that any standard MySQL client application or utility can connect. In the connection string, use the DNS address shown as the DB instance endpoint for the host parameter and the endpoint’s port for the port parameter:

mysql --host=your-rds-endpoint --port=3306 --user=app_user --password appdb

Use the RDS endpoint name rather than a hard-coded private IP so AWS can handle instance replacement. Configure TLS according to the RDS certificate and client guidance, especially if a connection leaves the VPC or crosses a network you do not fully control.

When an RDS instance must be public

A connection from outside the VPC requires the DB instance to be publicly accessible, an inbound security-group rule that permits the source, and the other AWS networking requirements. Public accessibility increases exposure; a private application host in the same VPC is the safer default.

What you gain—and what you give up

RDS provides resizing, connection authorization, backups or snapshots, Multi-AZ secondaries, read replicas, and performance monitoring. You do not receive shell, SSH, Telnet, or Windows Remote Desktop access to the database host, so operating-system tuning and some MySQL-level administration available on a VPS are unavailable or mediated by the service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Consider DigitalOcean managed MySQL

DigitalOcean’s managed MySQL documentation covers cluster creation, users and databases, connection troubleshooting, migration, performance, high availability, and API or CLI management. A managed cluster can remove much of the server-maintenance work while preserving a normal MySQL connection from your application.

Check the engine version and maintenance window before creating or migrating a cluster. DigitalOcean states that affected managed MySQL 8.0 clusters are scheduled for forced upgrades to MySQL 8.4 beginning 30 October 2026. The date and affected-cluster policy should be rechecked in the provider’s current documentation before you schedule production work.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Measure whether the move actually made the site faster

Use the same representative page requests and traffic profile before and after the change. Compare a warm-cache run with a cold-cache or first-request run; otherwise an application cache can hide database changes.

Metric What to look for Likely action
Network round-trip time Time for a simple query from the web host to the database. Move both hosts closer in the same private network or reduce chatty query patterns.
Query latency and slow queries Statements consuming the most total or average time. Add or adjust indexes, rewrite queries, and return only required columns.
Connection counts New connections per second, active sessions, and rejected connections. Use persistent connections or a pool with bounded size; verify server limits.
Buffer/cache hit rates Whether frequently read pages remain in memory. Right-size memory and tune queries after measuring, not by guesswork.
CPU, memory, and disk I/O Whether the database or web host is saturated. Resize the constrained tier or remove the offending workload.
End-user response time Tail latency, not just the average. Investigate timeouts, lock waits, queueing, and application retries.

If page latency rises after the move while local query time is unchanged, network delay or connection setup is the likely culprit. If database CPU or disk pressure falls but pages do not improve, the original bottleneck was elsewhere—perhaps application rendering, an external API, or insufficient caching.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Security and reliability checklist

  • Keep MySQL on a private network or VPC whenever possible.
  • Allow TCP 3306 only from the application host or its security group.
  • Bind MySQL to the required interface instead of every interface.
  • Use a MySQL account tied to the application’s private IP or controlled private network.
  • Grant only the schema privileges the running application needs.
  • Store credentials outside publicly served files and rotate them after migration.
  • Use TLS for database connections where supported, with certificate verification in production.
  • Confirm automated backups, retention, and a documented restore procedure.
  • Test connection timeouts, retry behavior, and what happens when the database is unavailable.
  • Monitor authentication failures, replication or high-availability health, storage growth, and slow queries.

Troubleshoot the common failure modes

Connection timed out

Check that the database service is running and listening on the intended address, then verify the VPC route, cloud security group, UFW rule, and any intermediate firewall. A timeout is rarely fixed by changing the MySQL password.

Host is not allowed to connect

The account’s host component does not match the source address MySQL sees. Create or alter the account for the web server’s actual private IP, then retest from that host. Do not solve this by changing the host to % without compensating controls.

Access denied for user

Verify the username, password, database name, and whether the client is using the expected host and port. Remember that 'app_user'@'localhost' and 'app_user'@'10.0.1.20' are distinct MySQL accounts.

Queries became slower

Measure round-trip time and connection creation time, then inspect slow queries and indexes. Batch related work, avoid unnecessary sequential queries, and use a connection pool with a sensible maximum. Moving the server again will not repair an unindexed query.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The application still uses the old database

Check for multiple configuration files, environment-specific overrides, cached configuration, and long-lived worker processes. Print the effective host and database name in a secure administrative diagnostic, restart workers, and remove any diagnostic output afterward.

When a remote database is the right choice

Separate MySQL when the web host is resource-constrained, database and application workloads need independent scaling, or managed backups and high availability justify the service trade-off. Keep MySQL local when the application is small, query latency is extremely sensitive, and one well-sized server has ample capacity and a tested backup plan. In either case, tune queries, indexes, caching, and connection management first; geography and architecture cannot compensate for inefficient database work.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.