Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsTo connect one VPS to MySQL on another over a private IP, make sure the VPS instances have a working private route, configure mysqld to listen on the database server’s private address, allow TCP port 3306 only from the client VPS, and create a MySQL account whose host matches that client address. Then connect with the private IP and --protocol=TCP. If you do not want direct database ingress, forward a local port through an SSH bastion instead.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What a private-IP MySQL connection requires
A private address by itself does not create connectivity. Four independent controls must agree:
As an Amazon Associate I earn from qualifying purchases.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →- Private networking: Both VPS instances need interfaces, routes, and provider-level rules that can carry traffic between their private addresses.
- MySQL listening address: The database server must listen on the private interface. The
bind_addresssetting controls which interfaces accept regular client TCP connections. Oracle’s MySQL 8.4 Reference Manual describes the server as listening on one or more network sockets for TCP/IP connections. - Network filtering: The provider security group or cloud firewall and the database VPS host firewall must permit TCP/3306 from the client’s private address.
- MySQL authorization: A MySQL account is identified by both its username and its host. The host portion must match the source address MySQL sees.
When all four are correct, the client connects directly to the database’s private address without exposing port 3306 on the public internet.
Plan the addresses and access boundary
Write down the private addresses before changing MySQL. The following values are examples; substitute the addresses assigned by your VPS provider.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
| Role | Example private address | Purpose |
|---|---|---|
| Database VPS | 10.0.2.10 |
Address that mysqld will bind to and that the client will use. |
| Client VPS | 10.0.2.20 |
Source address allowed through the firewalls and used in the MySQL account host. |
| Optional bastion | For example, 10.0.2.30 |
SSH endpoint for a tunnel when the database should not accept direct client connections. |
Confirm that both servers are on the same private network, or that the provider has routes between their private networks. A private IP is useful only when packets can travel between the two interfaces. If the provider offers security groups, private-network ACLs, or separate network segments, include those controls in the plan. Do not assume that two addresses in the same-looking range are automatically reachable.
Step 1: Verify private-network reachability
Perform network checks from the client VPS before changing MySQL. First confirm that the private interface and route exist. Use the operating system’s route and interface tools to verify that traffic for 10.0.2.10 leaves through the private interface rather than a public route. The exact interface name differs by distribution and provider.
- On the client VPS, inspect the route to the database address with the system route utility, such as
ip route get 10.0.2.10. - Confirm that the provider’s private-network security rules allow traffic from the client VPS to the database VPS.
- Check the database VPS host firewall rules. At this stage, a closed MySQL port is acceptable; the goal is to establish that the private path itself is present.
- After MySQL is configured and the firewall rule is added, test TCP reachability to port 3306 from the client. A timeout indicates that the path or a firewall is still blocking traffic; it does not identify which layer is responsible.
ICMP ping is not a definitive test because providers and firewalls may block ICMP while allowing TCP. Test the actual TCP port once a listener exists.
Step 2: Bind MySQL to the database VPS private interface
Edit the MySQL server option file used by your installation. Under the [mysqld] section, set:
[mysqld]
bind_address = 10.0.2.10
Replace the example address with the database VPS private address. This setting tells mysqld which interface or interfaces to use for regular client TCP connections. If the server must listen on more than one specific address, use a multi-address value documented for your MySQL version rather than binding broadly by habit. A private-only deployment should not bind the database listener to the public interface unless there is a separate, justified requirement.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Save the option file and restart the MySQL service using the service manager for that operating system. A restart is required for the listener change to take effect. If the service fails to start, inspect the MySQL service log for an invalid option, an address that is not assigned to the server, or a port conflict. Do not proceed to account or firewall troubleshooting until the service is running.
On the database VPS, verify the listener with:
ss -ltnp | grep 3306
The output should show a TCP listener associated with the private address, or with the documented addresses you intentionally configured. If it shows only a Unix socket or a different address, the client cannot use the private-IP command yet. If it shows a public address, revisit bind_address and your exposure decision before opening any firewall rule.
Step 3: Create a MySQL account restricted to the client VPS
Log in locally on the database VPS with an administrative account and create a user whose host is the client’s private address:
CREATE USER 'app'@'10.0.2.20' IDENTIFIED BY 'use-a-long-random-secret';
GRANT SELECT, INSERT, UPDATE, DELETE ON appdb.* TO 'app'@'10.0.2.20';
This example permits the application to read and modify rows in appdb, but it does not grant privileges on other databases or administrative capabilities. Select only the privileges the application actually needs. A read-only process might need only SELECT; schema migration tooling may require additional privileges during a controlled deployment, but those should not automatically be left on a runtime account.
The 'user'@'host' form is significant. The same username with a different host is a different MySQL account. The account above is eligible when MySQL identifies the connection source as 10.0.2.20. A broad host such as 'app'@'%' removes that restriction and is inappropriate when one known VPS is the only client. If a narrowly defined private subnet is genuinely required, use the narrowest host pattern supported by your MySQL version and network design, and document why multiple sources need access.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Use a long, unique password and store it in the application’s secret-management mechanism rather than in source code or a shell history. Do not reuse the administrative password. If you later move the application to another private address, create or alter an account for the new source deliberately; a private address change can otherwise look like a password failure.
Step 4: Restrict both firewall layers
Permit inbound TCP/3306 on the database VPS only from the client VPS private IP, or from the smallest private subnet that must connect. Apply the rule in both locations that may filter traffic:
- Provider or cloud firewall: Add an inbound TCP rule for destination port 3306 with source
10.0.2.20/32when a single client is sufficient. Keep the rule on the private network scope if your provider distinguishes private and public interfaces. - Database VPS host firewall: Add an equivalent allow rule for the client’s private address, then retain the firewall’s default-deny behavior for other sources.
- Public exposure check: Ensure there is no separate rule allowing TCP/3306 from
0.0.0.0/0or an equivalent unrestricted public source. Do not open the database port to the public internet for this private-network use case.
Rules must match the source address that actually arrives at the database. For a direct private connection, that is normally the client VPS private address. If a provider performs address translation or the traffic crosses a router, verify the observed source before choosing the firewall and MySQL host value.
Step 5: Connect explicitly over TCP
From the client VPS, use the database’s private address:
mysql --protocol=TCP -h 10.0.2.10 -P 3306 -u app -p appdb
Enter the password when prompted. The explicit --protocol=TCP option matters on Unix-like systems because the hostname localhost can select a local Unix socket instead of TCP. A socket is useful for a local database, but it cannot reach a MySQL server on another VPS. Use the private IP or another name that resolves to that private IP, and keep the protocol explicit when diagnosing connection behavior.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
If the login succeeds, verify that the session is using the intended database and that the account has only the expected operations. Test a harmless read first, then an application-level operation appropriate to the granted permissions. A successful TCP handshake does not prove that the account has the right database privileges; authentication and authorization are separate checks.
Diagnose failures in layers
Work from the network edge toward MySQL authentication. Changing passwords before proving that packets reach the listener can obscure the real fault.
Recommended Free Tools
| Symptom | Most likely layer | Checks and corrective action |
|---|---|---|
| Connection times out | Private route or firewall | Confirm the client route and private interface, provider security-group rules, and the database host firewall. Make sure the allow rule names the actual client source address. |
| Connection refused | No usable listener or wrong bind address | Run ss -ltnp | grep 3306 on the database VPS. Confirm that MySQL is running, that it listens on the private address, and that no service is bound only to a different interface. |
| Access denied for user | MySQL account matching or credentials | Check the username, password, database name, and the account’s host portion. The host must match the private source address MySQL sees. A correct network path can still be rejected at this stage. |
| TLS or secure-transport error | Client and server security policy | Determine whether the server requires encrypted transport or specific certificate verification. Use the MySQL client’s TLS options that match the server policy rather than weakening the requirement. |
Check in this order: private route and interface, provider security group, host firewall, the listening socket, the MySQL account host and password, and finally TLS requirements. This ordering distinguishes a packet that never arrives from a packet that reaches MySQL and is rejected by authorization.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Use an SSH tunnel when direct database ingress is undesirable
An SSH local forward is an alternative when the database should not accept direct connections from the client network. The bastion must be able to SSH to the database path and reach the database VPS private address. From the client, run:
ssh -N -L 13306:10.0.2.10:3306 [email protected]
Keep that SSH process running. It listens on port 13306 on the client VPS, sends traffic through the SSH session to the bastion, and has the bastion open a connection to 10.0.2.10:3306. In a second shell on the client VPS, connect to the local end:
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
mysql --protocol=TCP -h 127.0.0.1 -P 13306 -u app -p appdb
MySQL’s security guidance describes SSH as a way to obtain an encrypted TCP/IP connection between a MySQL server and client. MySQL documentation also describes port forwarding that lets the client use localhost while the traffic is carried through SSH.
The account and firewall source must reflect the tunnel’s actual path. With a typical local forward, the database sees the bastion as the TCP client, not the original application VPS. Therefore, the database firewall must allow the bastion’s private address, and the MySQL account host must match the source address presented by the bastion. Do not copy the direct-connection account rule blindly; verify the source that arrives at the database.
A tunnel adds operational state. The SSH session must remain authenticated, the local port must be free, and the bastion must retain network access to the database. For a long-running application, supervise the tunnel with an appropriate service mechanism and monitor reconnects. Never expose the local forwarded port beyond the interfaces that need it; binding the local end to 127.0.0.1 keeps it local to the client VPS.
Direct private TCP or SSH tunnel?
| Decision factor | Direct private-IP TCP | SSH local forward |
|---|---|---|
| Exposure | MySQL accepts traffic directly from an approved private source. Port 3306 remains off the public interface when binding and firewall rules are private-only. | MySQL accepts a connection from the bastion. The client reaches a local port, while SSH carries the forwarded traffic. |
| Operational complexity | Requires working private routing, provider rules, host firewall rules, the correct bind address, and a matching MySQL account host. | Requires all bastion prerequisites plus SSH authentication, a running tunnel, local-port management, and reconnect handling. |
| Performance path | Uses the direct private network path between client and database. | Adds an SSH forwarding hop and encryption processing, so the path is not as direct. |
| Failure diagnosis | Start with routing, provider filtering, host firewall, listener, and MySQL authorization. | Check SSH authentication and session state, local port binding, bastion-to-database routing and firewall rules, then the database listener and account. |
Choose direct private TCP when the private network is controlled and the client is an approved, stable source. Choose a tunnel when centralizing access through a bastion or avoiding direct database ingress is more important than the extra process and hop.
Quick Recap
Security and maintenance checklist
- Keep
bind_addresslimited to the private interface or explicitly documented interfaces. - Allow TCP/3306 only from required private sources in both provider and host firewalls.
- Use a MySQL account host that names the actual source address; avoid unrestricted host wildcards.
- Grant only the database and operations the application needs.
- Use a unique, high-entropy password and protect it outside application source files.
- Use
--protocol=TCPand the private address for direct connections so a local socket is not selected accidentally. - If the server requires TLS, configure the client to satisfy that policy instead of disabling it.
- Review private addresses, routes, firewall rules, and MySQL host entries whenever a VPS is rebuilt or its network interface changes.
- For tunnels, restrict the local forward to loopback, protect the SSH key, and monitor the tunnel’s lifetime and reconnect behavior.
Final validation sequence
- Record the database, client, and any bastion private addresses.
- Verify private routing and provider-level permission between the required hosts.
- Set
bind_addresson the database VPS and restart MySQL. - Confirm the listener with
ss -ltnp | grep 3306. - Create the least-privileged MySQL account with a host matching the direct client or tunnel source.
- Allow TCP/3306 only from that source in provider and host firewalls.
- Run the explicit TCP client command using the private address, or establish the SSH forward and connect to its loopback port.
- If it fails, classify the symptom as timeout, refusal, access denial, or TLS error and troubleshoot only the corresponding layer first.
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.




