This startup error means two MySQL processes are trying to claim one Unix socket, or a socket and lock file remain after the original process exited. First identify the socket path, PID, data directory, port and owning service. Stop an unintended duplicate, remove a socket file only after proving that no running process owns it, or assign separate settings when both servers are required.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What the error actually means
MySQL uses a Unix socket as a local communication endpoint. It also uses a lock mechanism so that two mysqld processes cannot bind the same socket. MySQL Bug #100035 records the startup message: “Another process with pid 12466 is using unix socket file.” The PID in that message is the process MySQL believes owns the socket.
As an Amazon Associate I earn from qualifying purchases.
The conflict can involve a live server or only a leftover artifact. An unclean shutdown can leave a socket or lock file on disk after mysqld has stopped. Conversely, deleting a file while another server is using it can disrupt the running instance or cause data loss, so file removal is never the first diagnostic step.
A socket collision is different from a SQL syntax problem. It prevents the daemon from opening its local endpoint, so startup fails before normal client queries can run.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Collect the facts before changing anything
Read the complete MySQL error log for the failed startup. Record every value it names:
- the Unix socket path;
- the PID reported as the owner;
- the data directory;
- the TCP port, commonly 3306 for a default instance;
- the service or unit that attempted to start; and
- the exact time and sequence of the failure.
Then determine whether the service manager and a manual launch are both involved. Package-managed installations may use a unit named mysql or mysqld; distributions differ. A manually started daemon can therefore compete with the package-managed unit even when only one installation was intentional.
Keep these values together as an instance identity. A socket path alone is not enough: two servers can have different sockets yet still collide on a port, PID file, log, or data directory. Conversely, a familiar socket filename does not prove that the process behind it is the server you intended to keep.
Safe diagnostic sequence
- Inspect the error log. Do not rely on a shortened console message. The full entry usually supplies the socket path, PID, data directory and port needed to identify the correct instance.
- Check the service manager. On a systemd installation, inspect the possible unit names with commands such as
systemctl status mysqlandsystemctl status mysqld. Use the name that exists on your distribution. A failed unit may have started a second process, or a different unit may already be active. - List running MySQL processes. Confirm the command line, PID and data directory for every
mysqldprocess. Do not terminate a PID merely because it appears in the error; establish which database it serves and whether that data must be preserved. - Check the socket path. Verify whether the configured Unix socket exists and whether a live process has opened it. The path in the server’s option files may differ from the path used by a client or by another installation.
- Check the TCP port. Verify whether the configured port is already in use. IBM’s support guidance for this exact symptom specifically calls for checking both
mysqldand port 3306 before deleting a socket file. - Compare ownership. Match the running process, service unit, socket path, data directory and port as one set. This distinguishes the intended server from a duplicate or an unrelated MySQL/MariaDB installation.
- Choose a situation-specific fix. Preserve a healthy intended instance, repair a stale artifact only when no process owns it, correct a client socket mismatch, or configure separate values for multiple intentional instances.
For a quick process and port inspection, administrators commonly use their operating system’s process and socket-listing utilities. The important result is not a particular utility’s output; it is proof of whether a live daemon owns the path and whether the configured port is occupied.
Run these checks before repeatedly restarting the service. Repeated starts can create confusing log sequences and make it harder to tell which unit launched which process. Save the relevant log lines and the process-to-datadir mapping so another administrator can review the decision.
Choose the fix that matches your situation
| Situation | Evidence | Correct action |
|---|---|---|
| An unintended duplicate service is running | A second service unit or manually launched mysqld owns the socket, port or data directory |
Stop the duplicate through its service manager, then start the intended unit |
| A stale socket or lock artifact remains | No running process owns the path, and the log shows the previous daemon exited | Stop the service, remove only the confirmed stale file, record what was removed, and start the intended service |
| Two servers are required | Both processes are intentional but share one or more defaults | Give each instance its own data directory, socket, port, PID file, log and service unit |
| The server is healthy but local clients fail | mysqld is running, but the client uses a different socket path |
Connect with the server’s actual socket path or deliberately use TCP with an explicit host and port |
The deciding questions are whether the existing process is intended, whether its data must be preserved, whether one or several instances are required, and which service manager controls startup. Stopping a duplicate is usually the smallest change. Removing a stale artifact is appropriate only when process and port checks prove that no daemon is using it. Reconfiguring instances is the right long-term fix when both servers are needed.
Fix an unintended duplicate service
This is the usual remedy when a package-managed service and a manually started daemon both use the default configuration.
Identify which instance should remain
Use the data directory and service ownership as the deciding evidence. A running process may contain the production database even if its service name looks unfamiliar. Verify the process command line, the directory containing its database files, the socket it owns and the port on which it listens.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Also check whether the duplicate is MySQL or MariaDB. Similar daemon names and default paths can make an unrelated installation look like the failed unit. Treat each process as a separate instance until its command-line options, datadir and service definition are matched.
Stop the duplicate through the service manager
On systemd, stop the unit that should not run, using the distribution’s actual unit name:
Free tools Windows power users keep installed
One-click scans. No signup required.
systemctl stop mysql
systemctl stop mysqld
Run only the command corresponding to the duplicate unit; do not stop both services indiscriminately. Confirm that the duplicate process has exited and that the intended instance still has its own data directory and socket.
Start the intended unit and verify it
systemctl start mysql
systemctl status mysql
If the installation uses mysqld instead, use that unit name. Read the fresh error log after startup and confirm that the intended socket path and port are open. MySQL’s systemd documentation notes that the unit configuration controls startup options, so inspect the unit and its option files if it repeatedly starts with unexpected values.
Once the intended unit is working, review enabled startup definitions so the duplicate does not return at the next reboot. A one-time stop fixes the current collision; removing the competing startup path fixes the cause.
Remove a stale socket safely
A stale artifact is plausible only after the daemon that created it is definitely gone. The safe order is:
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 & 11- Stop the affected service so it cannot race with your inspection.
- Check all running
mysqldprocesses, including ones started outside systemd. - Verify that no process owns the reported socket and that the relevant port is not serving the intended database.
- Record the exact socket and lock paths from the error log and preserve a copy or written record of the names before removal.
- Remove only the confirmed stale socket or lock artifact, never an entire data directory.
- Start the intended service and read the new startup log immediately.
If any process still owns the path, do not delete the file. Decide whether that process is the intended server or an unwanted duplicate. A socket filename by itself does not prove that it is stale; ownership and process state do.
The lock mechanism is part of MySQL’s protection against two daemons using one endpoint. Removing a lock or socket while the recorded process is alive defeats that protection. If the PID from the message is no longer present, still check for another process, a different service unit, and port ownership before concluding that the artifact is stale.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Run two MySQL instances intentionally
MySQL supports multiple servers on one host, but each instance must have independent operating parameters. The official multiple-instance guidance requires a separate data directory and different --socket and --port values for the second server. In practice, separate the following for every instance:
- data directory;
- Unix socket file;
- TCP port;
- PID file;
- error log; and
- service unit or other service-manager identity.
Sharing a data directory is not a way to make two daemons cooperate. It creates a separate conflict and can risk database corruption.
Recommended Free Tools
Use instance-specific systemd units
MySQL documents instance groups such as [mysqld@replica01] and [mysqld@replica02]. Each group can define its own datadir, socket, port and log-error. The resulting units can be started independently, for example:
systemctl start mysqld@replica01
systemctl start mysqld@replica02
The names above are illustrative of the documented instance pattern; the values in each unit must point to different resources. Before starting the second unit, compare every path and port with the first unit rather than changing only the socket.
Keep client connection details aligned
Each application must know which instance it should use. Give it the matching socket path when using local Unix-socket transport, or the matching host and port when using TCP. Otherwise the application can reach the wrong server or report that the socket does not exist even though its intended daemon is healthy.
Document the mapping between instance name, datadir, socket, port, PID file and log. That record makes upgrades, reboot checks and incident recovery safer than relying on default names.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →When MySQL is running but clients still report a socket error
MySQL’s client behavior explains many apparent contradictions: a connection to localhost normally uses a Unix socket unless connection parameters force TCP. If the server was configured with one socket path and the client reads a different option file containing another, the client fails locally while mysqld continues to run normally.
Connect through the server’s socket
Find the socket setting used by the running server, then pass that path explicitly in the client configuration or connection command. Check system-wide and per-user option files when the path changes unexpectedly; the server and client may not read the same files.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Test the explicit path against the intended datadir and service. A successful connection only proves that some server answered; verify that it is the correct instance before changing application settings.
Choose TCP deliberately
If the deployment is intended to use TCP, specify an explicit host and port rather than relying on localhost‘s socket default. The port must be the one assigned to that instance. This avoids a socket-path mismatch but does not solve a real port collision, so verify port ownership first.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Why the problem returns after reboot
A reboot can expose duplicate startup definitions that were invisible during manual operation. Typical patterns include an enabled package service plus a second custom unit, or a service that starts with one option file while an administrator launches another configuration by hand.
- List enabled MySQL-related units and identify which one owns each data directory.
- Remove or disable the unintended startup path after confirming that it is not the production instance.
- Keep one authoritative configuration for each server, including its socket, port, PID and log locations.
- For intentional replicas or test databases, use separate instance-specific units and values rather than shared defaults.
- After a reboot, verify the process, socket, data directory and port as a set before allowing applications to reconnect.
Do not assume that the unit which reports “active” is the only daemon. A manually launched process can survive or restart independently, and another distribution-specific unit may use the same defaults.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Common causes and the clue each one leaves
| Cause | Typical clue | What to verify |
|---|---|---|
| Second MySQL or MariaDB service using defaults | A different unit is active or a second daemon appears after startup | Service names, process command lines, socket and port ownership |
| Manual daemon competing with a package service | The process was launched outside the service manager | Command-line options, data directory and startup history |
| Unclean shutdown | No daemon owns the path, but a socket or lock file remains | Process list, port state and the previous shutdown condition |
| Two intentional instances share defaults | Both services are valid, but one cannot bind the common socket or port | Per-instance datadir, socket, port, PID and log settings |
| Different server and client option files | The server is reachable by one path while localhost clients fail |
Effective socket settings on both sides |
What not to do
- Do not delete
mysqld.sockmerely because the file exists. - Do not kill the PID from the error message until its data directory and service ownership are known.
- Do not start a second daemon with the same data directory, socket or port and hope it will select another value automatically.
- Do not assume that a successful process check means clients are configured correctly;
localhostmay still point to another socket. - Do not fix a port collision by changing only the port when the instances still share a data directory or PID and log files.
- Do not stop every MySQL-related unit as a shortcut; you may take the intended production database offline.
- Do not treat a missing socket file as proof that no server is listening; confirm the process and port state as well.
Recovery checklist
- Read the complete error log.
- Write down socket, PID, data directory and port values.
- Identify every MySQL-related service unit.
- List every running
mysqldprocess and match it to a data directory. - Confirm ownership of the socket and the TCP port.
- Stop only an unintended duplicate.
- Remove a socket or lock file only after no process owns it.
- For multiple servers, assign distinct datadirs, sockets, ports, PIDs, logs and units.
- For client failures, align the client socket with the server or use explicit TCP settings.
- Read the startup log again after the change and test the intended connection path.
Frequently asked questions
How do I fix “another daemon already running with the same socket”?
Identify the socket path and reported PID in the full error log, match that process to its service and data directory, and check port 3306 or the configured port. Stop an unintended duplicate through its service manager. Remove a socket or lock file only when no process owns it, then restart the intended unit.
What is using mysqld.sock?
The path may be owned by a live mysqld process, another MySQL or MariaDB installation, or only a stale artifact. Process ownership, the service unit, datadir and port establish which case applies; the filename alone does not.
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 errorsCan I run two MySQL servers on one machine?
Yes, if every instance has a separate data directory, Unix socket, TCP port, PID file, error log and service identity. Configure instance-specific systemd groups or equivalent units, and point each client to the matching socket or host and port.
Why will MySQL not start after a reboot?
Reboot often starts two enabled units or exposes a custom unit alongside a package service. List MySQL-related units, map each process to its datadir and settings, disable only the unintended startup path, and verify the surviving instance after reboot.
Best Value
Is it safe to remove a stale mysqld.sock?
Only after stopping the affected service and proving that no process owns the path or serves the relevant database on the configured port. Preserve a record of the path, remove only the confirmed stale socket or lock artifact, and inspect the new startup log.
Why does localhost fail while MySQL is running?
localhost normally selects Unix-socket transport. If the client reads a different socket setting than the server, it fails even though mysqld is healthy. Supply the server’s actual socket explicitly or use deliberate TCP with the correct host and port.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Should I change the port to solve the collision?
Changing the port is necessary when two intentional instances would otherwise share it, but it is not sufficient by itself. Also separate the datadir, socket, PID file, log and service unit, then update clients to use the selected port.
Is a product or replacement part required?
No. This is a software configuration and process-management problem. Diagnosis and repair use the operating system’s service, process and socket controls plus MySQL configuration; no physical product is uniquely required.
Frequently Asked Questions
How do I fix “another daemon already running with the same socket”?
Identify the socket path and reported PID, match the process to its service and data directory, and check the configured port. Stop an unintended duplicate through its service manager. Remove a socket or lock file only when no process owns it, then restart the intended unit.
Can I delete mysqld.sock?
Only after stopping the affected service and proving that no process owns the path or serves the relevant database on the configured port. Remove only the confirmed stale socket or lock artifact.
Can two MySQL servers run on one machine?
Yes. Give each instance a separate data directory, socket, TCP port, PID file, error log and service unit, then align each client with its instance.
Why does localhost fail when MySQL is running?
localhost normally uses a Unix socket. A client/server socket-path mismatch causes failure even when mysqld is healthy; specify the actual socket or use explicit TCP settings.
The Bottom Line
Treat the message as an ownership collision, not as permission to delete a familiar socket file. Match PID, process, service, datadir, socket and port; stop only an unintended daemon, remove only a proven stale artifact, and isolate every setting when multiple instances are intentional.
Quick Recap
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.




