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

If MySQL works on the server but fails from another computer, troubleshoot in layers: confirm the client is using the right host and port, verify that mysqld is listening on a reachable interface, allow that port through network firewalls, and authorize the client host in MySQL. A local account such as 'app'@'localhost' does not automatically permit a remote connection.

Why MySQL works locally but not from another computer

A local test can use a Unix socket or the loopback interface, while a remote test must complete a TCP connection to the server’s address and then pass MySQL authentication. A failure at any one of those stages can look like a login problem, so changing passwords or grants first often wastes time.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Layer What must be true Typical symptom
Client target The client uses the server’s reachable DNS name or IP and the configured TCP port. The command silently tests the wrong machine, or defaults to local access.
Server process and listener mysqld is running, TCP networking is enabled, and the configured interface is listening. Connection refused, or no listener appears on the expected port.
Network path and filtering Routes, security groups, and host firewalls allow the source to reach the MySQL port. A timeout or an unreachable-host error.
MySQL authorization The account’s Host value matches the connecting client, and its privileges allow the requested work. The server responds, then returns an access-denied error.

Keep these layers separate. A timeout is not fixed with GRANT, and a successful TCP handshake does not prove that the account is authorized.

Start with the exact client error

Record the complete error text, including the host and port shown by the client. The distinction determines your first check:

#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.
  • Timeout: usually indicates routing, a security group, a host firewall, or a service that is unreachable on that path.
  • Connection refused: commonly means that no process is listening on the target address and port, or that an intermediate device actively rejected it.
  • Access denied for user: the server was reached, but the username, password, authentication method, or account host does not match.
  • Unknown host or name-resolution error: the client cannot resolve the name you supplied; test the server’s IP or correct the DNS record before investigating MySQL.

Run the test with an explicit host. Omitting -h makes the MySQL client use localhost, which can test a local socket or loopback connection instead of the remote server:

mysql -h server.example -P 3306 -u app_user -p

Replace the example values with the deployment’s actual server name, port, and account. The default MySQL TCP port is 3306, but a custom port setting must be used consistently by the server, firewall, and client.

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

Verify that mysqld is running and the port is available

Check the server process first

On the database host, confirm that the MySQL server process is running and review its startup or error log for binding failures. A stopped service cannot accept either local or remote TCP sessions. Also check whether another process already owns the configured port; a collision can prevent MySQL from starting or leave it listening somewhere other than expected.

Use the operating system’s service and socket-listening tools for your platform to answer two precise questions: “Is mysqld running?” and “Which address and port does it own?” Do not assume that a successful local command proves TCP is enabled; a local client may be using a Unix socket.

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

Confirm the configured port

Read the effective MySQL port value rather than relying on the default. If the server uses 3307, for example, testing 3306 will produce a misleading refusal or timeout. The same value must be allowed by every host firewall, cloud security rule, load balancer rule, and client connection string on the path.

Distinguish a listener problem from a firewall problem

A listener check on the database host should show MySQL bound to the expected address and port. If nothing is listening, fix the service or configuration before opening firewall rules. If it is listening locally but remote tests time out, continue with routing and filtering checks.

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

Fix bind_address and skip_networking

Understand what skip_networking does

If MySQL starts with skip_networking enabled, it cannot accept TCP/IP connections at all. Local socket connections may still work, which is why this setting can be mistaken for a remote authentication failure. Remove or disable the setting when TCP access is required, then restart MySQL and verify the listener again.

Choose a reachable bind address

The startup variable bind_address controls the interfaces on which mysqld listens:

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.
Value Effect When it fits
127.0.0.1 Loopback only; accepts local TCP clients and rejects remote interfaces. Intentionally local-only databases.
A specific server IP Listens only on that interface. Servers with separate public, private, or management networks where one interface should serve the database.
*, 0.0.0.0, or :: Wildcard binding; listens on all applicable interfaces. Only when firewall policy and network isolation deliberately protect every exposed interface.

Oracle’s MySQL documentation specifically notes that bind_address=127.0.0.1 permits only local loopback connections. A wildcard is not an authorization rule: it increases the number of reachable interfaces, so restrict sources at the firewall and in MySQL accounts.

Change the setting and restart

  1. Locate the active MySQL server configuration file used by this installation.
  2. Set bind_address to the server interface that the client can route to, or to the required wildcard form when that exposure is intentional.
  3. Ensure skip_networking is not enabled if TCP is required.
  4. Restart the MySQL service; bind_address is a startup setting, so editing the file without a restart does not change the listener.
  5. Recheck the listening address and port from the server host, then test from the client.

Do not bind to a public interface merely to make a test pass. A private address reachable through a controlled network is safer; if a public interface is unavoidable, pair it with source-restricted firewall rules and narrowly scoped accounts.

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.

Allow the connection through the network and host firewalls

Trace the path from the real client

Test from the same computer, container, or application host that will use MySQL. A test from the database server itself bypasses routing and many firewall boundaries. Confirm that the client resolves the intended server name and that the route reaches the interface selected by bind_address.

Permit only the required source

Open the configured MySQL port only to the client subnet, security group, or individual source addresses that need it. Check every enforcement point: the database host firewall, cloud security group, network ACL, container or orchestration policy, VPN rules, and any intervening firewall. MySQL’s troubleshooting guidance identifies host firewalls as a common reason an otherwise configured port is inaccessible.

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.

A rule for TCP 3306 does not help if the server actually uses another port, and a rule for the wrong source address does not help if the application exits through NAT. Record the source address observed by the firewall and authorize that address or its controlled subnet.

Interpret the result without guessing

  • If packets never reach the host, correct routing, DNS, VPN, or upstream filtering.
  • If packets reach the host but the port times out, inspect local firewall policy and whether the listener is bound to the address being contacted.
  • If the host immediately rejects the connection, verify that a listener exists on that exact address and port.
  • If the server answers and MySQL returns an error, the network path is working; move to account authorization.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Authorize the client host in MySQL

Why localhost is different from a remote host

MySQL accounts include both a user name and a host. The server matches the incoming username and client host against the User and Host columns. These are different accounts:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Account Matches Remote connection allowed?
'app'@'localhost' Local connections identified as localhost. No, not merely because the username and password are the same.
'app'@'203.0.113.25' The specified client IP. Yes, when the password and privileges are correct.
'app'@'10.20.30.%' Clients in that intended private subnet pattern. Yes, for matching hosts; verify the pattern is no broader than needed.
'app'@'%' A wildcard host. Potentially, from any source that can reach the listener; avoid unless the exposure is deliberate and compensating controls exist.

More-specific Host rows take precedence over wildcard rows. An exact client-IP row can therefore determine the effective account even when a % row also exists. Inspect existing rows before creating another account so you do not troubleshoot the wrong credentials or unintentionally grant broader access.

Create a narrowly scoped remote account

Connect locally with an administrative account and create an account for the actual client address or controlled subnet. For example:

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.
CREATE USER 'app_user'@'203.0.113.25' IDENTIFIED BY 'use-a-strong-secret';
GRANT SELECT, INSERT, UPDATE, DELETE ON application_db.* TO 'app_user'@'203.0.113.25';

The IP, database name, privileges, and secret in this example are illustrative; replace them with the deployment values and grant only the operations the application needs. If the client address is dynamic, use a deliberately restricted subnet pattern or a stable network identity rather than defaulting to %. Coordinate the account’s host value with the address that MySQL actually sees after NAT.

Check the account you are really using

When an account already exists, verify its host-specific definition and effective privileges from an administrative session. A password reset on 'app'@'localhost' will not repair an access-denied error for 'app'@'203.0.113.25'; those are separate rows.

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

Retest with explicit parameters and verify the session

  1. From the real client, run mysql -h server.example -P 3306 -u app_user -p with the deployment’s host, port, and account.
  2. Enter the password for the matching host-specific account.
  3. After login, run SELECT USER(), CURRENT_USER();. USER() shows the user and client host presented by the session; CURRENT_USER() shows the account row MySQL used for authorization.
  4. Run STATUS and confirm the server, protocol, and connection details correspond to the intended remote endpoint rather than a local socket.
  5. Execute the smallest application-specific query needed to verify the granted privileges, then close the session.

If the command still fails, compare the new error with the original. A change from timeout to access denied is useful progress: it proves that the listener and network path now work, leaving account matching or credentials to resolve.

Managed MySQL changes the troubleshooting boundary

With a managed database service, you usually do not edit mysqld‘s local configuration or host firewall. The provider supplies a database hostname, port, and connection policy, while you permit the connecting clients’ public IP addresses or network identities in the provider’s controls. The same layers still apply, but listener administration moves to the provider.

Deployment You control Typical remote-access task
Self-managed server MySQL process, bind_address, skip_networking, operating-system firewall, network rules, and accounts. Enable a reachable listener and permit a restricted source.
Managed database Provider network allowlists, client routing, credentials, and MySQL account host rules where exposed. Use the provider hostname and allow the client’s permitted public IP or private network path.

Provider-specific networking, maintenance, and program terms vary. Follow the service’s documented hostname, port, TLS, and allowlist requirements instead of applying self-managed configuration-file instructions.

Security checks after the connection works

  • Remove temporary broad firewall rules and replace them with the smallest required source range.
  • Do not leave a wildcard bind_address exposed without controls on every interface.
  • Prefer an exact client IP or narrowly defined subnet in the account’s Host value over %.
  • Use a dedicated application account with minimum required database privileges, not an administrative account.
  • Document the non-default port wherever it is configured so future client, firewall, and monitoring changes stay consistent.
  • Retest after restarts and network changes; a configuration that works only through a local socket is not evidence of remote readiness.

A compact decision path

  1. Wrong target? Re-run with explicit -h and -P.
  2. No listener? Start or repair mysqld, resolve port conflicts, and confirm the configured port.
  3. TCP disabled or loopback-only? Disable skip_networking when required, change bind_address, restart, and verify.
  4. Timeout or filtered port? Trace routing and permit only the required source through each firewall or security group.
  5. Access denied after the server answers? Match the account’s Host to the actual client address, check precedence, and use the correct password and privileges.
  6. Connected but uncertain? Run SELECT USER(), CURRENT_USER(); and STATUS to confirm identity and transport.

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.

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