Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11If MySQL stopped starting immediately after you changed bind-address, the usual cause is that the configured IP address is not assigned to the machine when mysqld starts. Restore a currently assigned address, a deliberate loopback or wildcard policy, or revert the change, then restart the service. If the log instead says Address already in use, another process already owns the configured port and the remedy is different.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
The reliable fix is to read the daemon’s actual error output, verify the address and port at the operating-system level, restart the correct service, and test TCP separately from Unix-socket connections.
As an Amazon Associate I earn from qualifying purchases.
Recommended Free Tools
Identify the failure before changing anything else
Start with the service status and the MySQL error output. Linux distributions use different unit names, so substitute the name installed on your host.
sudo systemctl status mysql --no-pager
sudo journalctl -u mysql -b --no-pager
# On distributions that use mysqld as the unit name:
sudo systemctl status mysqld --no-pager
sudo journalctl -u mysqld -b --no-pager
Also inspect the MySQL error log configured for your installation. Startup failures involving the data directory, grant tables, interfaces, addresses, and ports are written to MySQL’s error output or log. The final lines around the failed start are normally more useful than a generic “failed” result from systemd.
#1 Best Overall
The address is not present
This error identifies a bad local address:
Can't start server: Bind on TCP/IP port: Cannot assign requested address
It means the value in bind-address names an address that the operating system cannot bind at startup. The address may have disappeared because DHCP supplied a different lease, a cloud instance was reassigned an address, a network interface came up later than the database, a container has a different network namespace, or an interface was renamed.
The port is already occupied
This message points to a conflict rather than a missing interface:
Can't start server: Bind on TCP/IP port: Address already in use
Another MySQL instance or another program is already listening on the selected port. MySQL’s default TCP port is 3306. Find the owner before stopping anything.
sudo ss -ltnp | grep ':3306'
# If ss is unavailable:
sudo netstat -ltnp | grep ':3306'
If the process is an old mysqld instance, stop it through its service manager rather than killing it blindly. If it is a different service, either move that service or configure MySQL to use another port and update every client and firewall rule that depends on 3306.
Recover service startup in a safe order
- Save the current configuration. Copy the file you edited so you can compare or restore it.
- Record the exact error. Use
systemctl,journalctl, and the MySQL error log. Do not infer an address problem from a generic systemd status line. - List addresses currently assigned to the host. Run
ip addressand compare the result with the configured value. - Resolve the specific failure. Replace an absent address, or find the process holding the port if the message says it is already in use.
- Restart the correct unit. Ubuntu commonly uses
mysql; other installations may usemysqld. - Confirm the listener. Use a socket/listener tool to verify the address and port, not just that the service reports “active.”
- Test TCP explicitly. A successful local Unix-socket login does not demonstrate that TCP is working.
Verify that the configured address exists now
Display all IPv4 and IPv6 addresses on every interface:
ip address show
Look for the exact address from the MySQL configuration. An address such as 192.168.0.5 is usable only if it appears on an active local interface at the moment mysqld binds. An address shown in an old cloud console, DHCP lease, container configuration, or DNS record is not sufficient by itself.
For a quick list of addresses, you can also run:
hostname -I
Use the detailed ip address show output for the final decision because it shows interface state and address scope. Check again after a reboot or network restart if the failure is intermittent. A previously valid address can vanish after a DHCP renewal or cloud network change, causing the next database start to fail.
When the interface appears after MySQL starts
If the address is assigned only after boot, MySQL can fail even though the address eventually becomes visible. Correct the boot ordering or use a binding policy that does not depend on a transient address. For a machine whose address changes legitimately, a fixed interface-specific address is brittle; use a deliberate loopback or wildcard policy and enforce exposure with firewall and account controls instead.
Choose the right bind-address policy
bind-address controls the local interfaces on which MySQL accepts TCP connections. It does not grant a database account permission to log in, and it does not open a firewall. Select the narrowest value that meets your client requirements.
| Value | Interfaces exposed | Address stability | Typical use | Controls still required |
|---|---|---|---|---|
127.0.0.1 |
IPv4 loopback only | Stable on the host | Local TCP clients only; no remote database clients | Database account permissions; no remote TCP path is created |
A specific current server address, such as 192.168.0.5 |
Only the interface owning that address | Depends on DHCP, cloud reassignment, and boot timing | Restricting MySQL to one network interface | Firewall rules and account host permissions for intended clients |
0.0.0.0 |
All IPv4 interfaces | Not tied to one changing IPv4 address | Hosts that intentionally accept connections on multiple IPv4 interfaces | Strict firewall rules, least-privilege accounts, and network segmentation |
127.0.0.1 is appropriate when every client runs on the same machine. It deliberately rejects remote TCP clients even when local applications work. A specific address is tighter, but MySQL cannot start until that address exists. 0.0.0.0 is an operational option, not a security setting: it exposes a listener on every IPv4 interface, so firewall and account restrictions become essential. None of these values changes Unix-socket behavior.
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 errorsEdit the active MySQL configuration
On Ubuntu, the commonly documented server configuration file is:
/etc/mysql/mysql.conf.d/mysqld.cnf
Other distributions may use a different included file. Confirm which files your installation loads before editing; changing an unused file has no effect. Search the configuration tree for every bind directive so a later file does not override your edit.
sudo grep -Rni --include='*.cnf' '^[[:space:]]*bind-address' /etc/mysql 2>/dev/null
Within the [mysqld] section, set one intentional value, for example:
[mysqld]
bind-address = 192.168.0.5
Do not leave multiple active bind-address lines in different included files and assume the first one wins. MySQL option-file processing can make the effective value differ from the line you just edited. Remove or comment out obsolete entries, preserve the section header, and keep a backup of the original file.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Ubuntu’s documented example uses bind-address = 192.168.0.5 and requires a restart before the change takes effect. A reload is not enough for a listening socket change.
Rank #4
Emergency rollback
If you need to restore availability quickly and the previous value was known to work, put that value back, save the file, and restart. If the old address is no longer assigned, do not blindly restore it; choose an address visible in ip address show or use a deliberate loopback policy while you repair network addressing.
Restart and verify the listener
Restart the unit that actually runs your server:
sudo systemctl restart mysql
sudo systemctl status mysql --no-pager
Or, where the unit is named mysqld:
sudo systemctl restart mysqld
sudo systemctl status mysqld --no-pager
Then inspect listening sockets:
sudo ss -ltnp | grep -E '(:3306|mysqld|mysql)'
# Alternative on systems with net-tools:
sudo netstat -ltnp | grep ':3306'
The result should show the address you selected and the expected port. A listener on 127.0.0.1:3306 is local-only; a listener on a specific LAN address is limited to that interface; a listener on 0.0.0.0:3306 covers all IPv4 interfaces. If no row appears, return to the error log rather than changing firewall rules.
Test TCP separately from the Unix socket
MySQL clients commonly treat localhost specially and connect through a Unix socket. That path can succeed while TCP is disabled or bound to the wrong interface. MySQL documentation states that when skip_networking is enabled, the server cannot accept TCP/IP connections at all. It also states that with bind_address=127.0.0.1, TCP/IP connections are accepted only locally.
Force a TCP test by supplying an explicit host. Use an account that is authorized for the test and provide credentials through your normal secure method:
mysql -h 127.0.0.1 -P 3306 -u your_user -p
# Test the server's intended network address:
mysql -h 192.168.0.5 -P 3306 -u your_user -p
Replace the example address with the value actually assigned to your host. The explicit -h parameter prevents the client from silently selecting a Unix socket. A successful socket login followed by a failed explicit TCP login narrows the problem to TCP configuration, the listener address, skip_networking, or filtering between client and server.
Best Value
When MySQL starts but remote clients still fail
Check the effective listener
Use ss from the server and confirm that MySQL is listening on the interface remote clients use. A service can be healthy while listening only on loopback. If it is bound to a specific address, verify that remote clients route to that address and that the address belongs to the intended interface.
Check skip_networking
If skip_networking is enabled in the server options, MySQL disables TCP/IP entirely. Remove or disable that option when TCP clients are required, then restart and verify that a TCP listener appears. Do not confuse a successful Unix-socket connection with proof that TCP is enabled.
Check host and cloud firewalls
Permit TCP 3306 only from the networks that need it. There are usually two filtering layers: the operating system firewall and, for hosted machines, a provider security group or cloud firewall. Opening one while leaving the other closed still produces a remote connection failure. If you changed MySQL to a non-default port, permit that port instead and update clients accordingly.
Check MySQL account host permissions
Reaching the TCP listener is not the same as being authorized to log in. MySQL accounts include a host component, so an account permitted from localhost may not be permitted from a remote client address. Once the network path works, inspect the account definitions and create the narrowest host rule required by your deployment. Do not solve an account error by binding MySQL to every interface or by granting broad access.
Diagnose common real-world causes
DHCP or cloud address changes
A static-looking configuration can become invalid when a lease changes or a virtual machine receives a new private address. Compare the configured value with ip address show, update the MySQL option to the current deliberate address, and restart. For recurring changes, use stable addressing or a binding policy that is independent of one ephemeral address, then constrain exposure with firewall rules.
Renamed or missing interfaces
Modern Linux systems may name interfaces differently after a hardware, image, or cloud change. MySQL does not bind to an interface name in this setting; it binds to the address. Nevertheless, an interface rename can remove the old address or delay when it appears. Confirm both interface state and address assignment before editing MySQL again.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Containers and separate network namespaces
An address visible on the host is not automatically visible inside a container. Run the address check in the same namespace as mysqld. Bind to an address that exists there, or use the container’s intended network configuration and publish the port at the host boundary. A host address placed in a container’s MySQL configuration commonly produces “Cannot assign requested address.”
Two MySQL instances
Package upgrades, manual launches, and multiple instances can leave one server listening while systemd tries to start another. The “Address already in use” message and the ss process column identify this case. Decide which instance owns the data directory and port, stop the unintended instance cleanly, and then start the managed service.
Quick Recap
Use this decision path for fast troubleshooting
- Service fails with “Cannot assign requested address”: compare
bind-addresswithip address show; replace the absent address or correct network startup ordering. - Service fails with “Address already in use”: inspect port 3306, identify the owning process, and stop it or select a different port.
- Service is active but no TCP listener exists: check
skip_networking, the effective option files, and the error log. - Listener is on loopback only: change the bind policy if remote clients are required, then restart.
- Listener is correct but remote connections time out: check host and cloud firewalls and routing.
- Remote clients reach MySQL but receive an access error: inspect MySQL account host permissions; the bind address is no longer the primary problem.
- Local
localhostlogin works but explicit-hfails: you tested a Unix socket, not TCP; verify the TCP listener andskip_networking.
Prevent the problem from returning
- Document whether MySQL is intended for local-only, one-interface, or multi-interface access.
- Use an address that is guaranteed to exist before the database starts, or deliberately avoid dependence on a changing address.
- Keep only one active bind setting in the loaded option files and retain a tested backup.
- After network, image, or cloud changes, check the assigned addresses before restarting MySQL.
- Monitor both service state and listening sockets; “active” alone does not prove the expected interface is open.
- Test with an explicit TCP host during deployment checks, in addition to a Unix-socket health check.
- Limit firewall sources and database account host patterns to the clients that genuinely need access.
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.




