# Obscure mysql error when trying to start site

**URL:** <https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357>\
**Category:** Support\
**Created:** [June 18, 2024, 8:22pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357 "2024-06-18T20:22:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![joelclimbsthings](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/joelclimbsthings/32/22041_2.png) [@joelclimbsthings](https://community.localwp.com/u/joelclimbsthings)\
**Post date:** [June 18, 2024, 8:22pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/1 "2024-06-18T20:22:49Z")

</div>

# Bug Summary

I’ve been using Local successfully for a long while, but I’ve suddenly started encountering an error when I try to start any site. I’ve tried reinstalling, updating, starting from blueprint and from scratch, creating the `mysqld.sock` file, all to no avail.

Here’s the error I’m seeing:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/6/0/60ecce76ec08687388198bf8121fde467bdadfbf.png)

I’ve also noticed this only happens when I try to create a site with MySQL 8.\*. If I try an older version it doesn’t happen.

# Steps to reproduce

It happens when I try to start any site.

# Environment Info

Describe your environment.

- What Operating System are you using?  
Ubuntu
- What versions of site software (Nginx, Apache, PHP, MySQL) is used?  
It occurs with version Mysql 8.\*
- What version of Local is installed?  
9.0.3

# Supporting info

Please provide your Local Log. See this Community Forum post for instructions on how to do so:

Here’s the log file(s)

```auto
{"class":"Process","level":"warn","message":"nginx: [emerg] bind() to [::1]:10008 failed (99: Cannot assign requested address)","process":"nginx","thread":"main","timestamp":"2024-06-18T20:22:19.069Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:19.187157Z 0 [System] [MY-010116] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqld (mysqld 8.0.16) starting as process 10124","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:19.454Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:19.187871Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:19.454Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:19.454237Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:19.454Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:19.454338Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Cannot assign requested address","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:19.455Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:19.454339Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 10009 ?","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:19.455Z"}
{"class":"Process","level":"warn","message":"nginx: [emerg] bind() to [::1]:10008 failed (99: Cannot assign requested address)","process":"nginx","thread":"main","timestamp":"2024-06-18T20:22:19.577Z"}
{"class":"Process","level":"warn","message":"nginx: [emerg] bind() to [::1]:10008 failed (99: Cannot assign requested address)","process":"nginx","thread":"main","timestamp":"2024-06-18T20:22:20.085Z"}
{"class":"Process","level":"warn","message":"nginx: [emerg] bind() to [::1]:10008 failed (99: Cannot assign requested address)","process":"nginx","thread":"main","timestamp":"2024-06-18T20:22:20.592Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:19.454428Z 0 [ERROR] [MY-010119] [Server] Aborting","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:21.370Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:21.370141Z 0 [System] [MY-010910] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqld: Shutdown complete (mysqld 8.0.16) MySQL Community Server - GPL.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:21.370Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:22.027073Z 0 [System] [MY-010116] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqld (mysqld 8.0.16) starting as process 10181","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:22.272Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:22.027596Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:22.272Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:22.271670Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:22.272Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:22.271766Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Cannot assign requested address","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:22.272Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:22.271767Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 10009 ?","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:22.272Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:22.271842Z 0 [ERROR] [MY-010119] [Server] Aborting","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:23.682Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:23.681841Z 0 [System] [MY-010910] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqld: Shutdown complete (mysqld 8.0.16) MySQL Community Server - GPL.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:23.682Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:24.367189Z 0 [System] [MY-010116] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqld (mysqld 8.0.16) starting as process 10228","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:24.606Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:24.367670Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:24.606Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:24.605601Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:24.606Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:24.605698Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Cannot assign requested address","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:24.606Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:24.605699Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 10009 ?","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:24.607Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:24.605772Z 0 [ERROR] [MY-010119] [Server] Aborting","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:26.017Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:26.016894Z 0 [System] [MY-010910] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqld: Shutdown complete (mysqld 8.0.16) MySQL Community Server - GPL.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:26.018Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:26.719068Z 0 [System] [MY-010116] [Server] %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqld (mysqld 8.0.16) starting as process 10281","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:26.960Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:26.719521Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:26.960Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:26.959622Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:26.960Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:26.959714Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Cannot assign requested address","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:26.960Z"}
{"class":"Process","level":"warn","message":"2024-06-18T20:22:26.959715Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 10009 ?","process":"mysql","thread":"main","timestamp":"2024-06-18T20:22:26.961Z"}
{"level":"error","message":"Database did NOT respond to ping after 15 tries.","service":{},"serviceBinVersion":{},"stack":"Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqladmin ping\n\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Can't connect to local MySQL server through socket '%%site.runData%%/mysql/mysqld.sock' (2)'\nCheck that mysqld is running and that the socket: '%%site.runData%%/mysql/mysqld.sock' exists!\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at maybeClose (node:internal/child_process:1098:16)\n at Socket.<anonymous> (node:internal/child_process:450:11)\n at Socket.emit (node:events:517:28)\n at Pipe.<anonymous> (node:net:350:12)","thread":"main","timestamp":"2024-06-18T20:22:27.120Z"}
{"class":"SiteProcessManagerService","level":"error","message":"Unable to start site.","stack":"Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqladmin ping\n\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Can't connect to local MySQL server through socket '%%site.runData%%/mysql/mysqld.sock' (2)'\nCheck that mysqld is running and that the socket: '%%site.runData%%/mysql/mysqld.sock' exists!\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at maybeClose (node:internal/child_process:1098:16)\n at Socket.<anonymous> (node:internal/child_process:450:11)\n at Socket.emit (node:events:517:28)\n at Pipe.<anonymous> (node:net:350:12)","thread":"main","timestamp":"2024-06-18T20:22:27.120Z"}
{"class":"SiteProvisionerService","level":"error","message":"Unable to provision site.","stack":"Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqladmin ping\n\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Can't connect to local MySQL server through socket '%%site.runData%%/mysql/mysqld.sock' (2)'\nCheck that mysqld is running and that the socket: '%%site.runData%%/mysql/mysqld.sock' exists!\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at maybeClose (node:internal/child_process:1098:16)\n at Socket.<anonymous> (node:internal/child_process:450:11)\n at Socket.emit (node:events:517:28)\n at Pipe.<anonymous> (node:net:350:12)","thread":"main","timestamp":"2024-06-18T20:22:28.732Z"}
{"eventId":"600924e26eb940879ca68c12e91e0029","level":"warn","message":"Unhandled Rejection.","p":{},"reason":{"cmd":"%%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqladmin ping","code":1,"killed":false,"signal":null},"thread":"main","timestamp":"2024-06-18T20:22:29.868Z"}

```

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [June 19, 2024, 1:51pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/2 "2024-06-19T13:51:12Z")

</div>

Hi @joelclimbsthings

When you’re creating a site with MySQL 8 are you using a specific PHP version? Or do you get the same error no matter what version you select?

---

<div class="post-metadata">

**Author:** ![joelclimbsthings](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/joelclimbsthings/32/22041_2.png) [@joelclimbsthings](https://community.localwp.com/u/joelclimbsthings)\
**Post date:** [June 19, 2024, 3:01pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/3 "2024-06-19T15:01:27Z")

</div>

Hi @Nick-B ,

It doesn’t seem to be influenced by the PHP version, only the MySQL version. If I use a version of MySQL other than 8.0.16 then I can create the site without error, but it doesn’t actually work (404’s for both admin and site). Any site with 8.0.16 throws the above error.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [June 20, 2024, 12:59pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/4 "2024-06-20T12:59:55Z")

</div>

What about changing your Router Mode? Does that have any impact? Some of the errors in your logs may indicate a port conflict.

Preferences\>Advanced\>Router Mode

> **[What is Router Mode?](https://localwp.com/help-docs/advanced/router-mode/)**
>
> Router Mode is Local’s way of offering the best offline development experience possible while still “playing nice” with other, similar development applications.

---

<div class="post-metadata">

**Author:** ![joelclimbsthings](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/joelclimbsthings/32/22041_2.png) [@joelclimbsthings](https://community.localwp.com/u/joelclimbsthings)\
**Post date:** [June 20, 2024, 3:56pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/5 "2024-06-20T15:56:51Z")

</div>

I’ve usually used localhost as I’ve always had conflicts with using custom domains for each site. That said, I just switched and still receive the same error message no matter the routing mode.

The only combination I’ve found that results in a working site is MySQL 5 and Apache, as for some reason using nginx I was able to create a site, but it was broken (not resolving).

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [June 20, 2024, 7:41pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/6 "2024-06-20T19:41:43Z")

</div>

Are you running other developer applications simultaneously? Apps like MAMP, XAMPP, or Docker for example.

---

<div class="post-metadata">

**Author:** ![joelclimbsthings](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/joelclimbsthings/32/22041_2.png) [@joelclimbsthings](https://community.localwp.com/u/joelclimbsthings)\
**Post date:** [July 2, 2024, 9:07pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/7 "2024-07-02T21:07:42Z")

</div>

I have, although I’ve also shut down any processes that have open ports and still encountered the same error. 🤷

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [July 3, 2024, 3:05pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/8 "2024-07-03T15:05:17Z")

</div>

Hi @joelclimbsthings

Could you share your full logs here so we can review those? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the `Download Local Logs` button from the `Support` tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

---

<div class="post-metadata">

**Author:** ![joelclimbsthings](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/joelclimbsthings/32/22041_2.png) [@joelclimbsthings](https://community.localwp.com/u/joelclimbsthings)\
**Post date:** [July 3, 2024, 3:33pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/9 "2024-07-03T15:33:49Z")

</div>

Yup, I can do that. Note that there are a few older router logs pointing to a failure to bind, but they seem to be unrelated to this issue.

[local-logs.zip](https://community.localwp.com/uploads/short-url/9EVwEdul4wpFov9b1lRXudMaJaa.zip) (79.4 KB)

Thanks!  
Joel T

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [July 18, 2024, 5:09pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/12 "2024-07-18T17:09:47Z")

</div>

Thanks for these logs @joelclimbsthings !

One thing that stands out to me are a number of lines that look like:

```auto
{"class":"SiteProcessManagerService","level":"error","message":"Unable to start site.","stack":"Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqladmin ping\n\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Can't connect to local MySQL server through socket '%%site.runData%%/mysql/mysqld.sock' (2)'\nCheck that mysqld is running and that the socket: '%%site.runData%%/mysql/mysqld.sock' exists!\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at maybeClose (node:internal/child_process:1098:16)\n at ChildProcess._handle.onexit (node:internal/child_process:303:5)","thread":"main","timestamp":"2024-07-03T15:23:35.142Z"}

```

Note that path of:

```auto
'%%site.runData%%/mysql/mysqld.sock' (2)'

```

That almost seems like there was a `mysqld.sock` file already there for the site.

Does this error show even when creating new sites?

You can also verify that those `.sock` files are cleaned up correctly by:

1. Stop all sites and quit Local
2. Open a terminal and run the following `find` command to see if there are any of those files in Local’s “run” folder:

```auto
find ~/.config/Local/run -name 'mysqld.sock*'

```

If that returns any files, even with Local stopped, that indicates that something wasn’t cleaned up correctly. Could you try deleting those files and then starting Local again?

The only other thing that looks odd to me are lines like this:

```auto
{"class":"Process","level":"warn","message":"nginx: [emerg] bind() to [::1]:10005 failed (99: Cannot assign requested address)","process":"nginx","thread":"main","timestamp":"2024-07-03T15:23:28.568Z"}

```

I’m not 100% sure, but I think that Local mostly uses IPv4, so the presence of an IPv6 string (`[::1]`) hints that maybe there’s an issue with how DNS is resolving and obtaining ports.

Out of curiousity, you mention running Ubuntu – What version is used, or is this an Ubuntu derivative like Pop\_OS?

---

<div class="post-metadata">

**Author:** ![joelclimbsthings](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/joelclimbsthings/32/22041_2.png) [@joelclimbsthings](https://community.localwp.com/u/joelclimbsthings)\
**Post date:** [July 19, 2024, 4:14pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/13 "2024-07-19T16:14:43Z")

</div>

I really appreciate the response @ben.turner .

I had taken a look at the socks file it referenced, and it doesn’t seem to exist before, during or after I create a new site (and receive that error). Running that `find` command brings no results.

That’s an interesting observation about the IPv6 string–I am using Pop\_OS actually, and I have been for the last several years successfully with Local until the last few months. I didn’t have any OS updates or other changes, so I’m really uncertain what might have triggered the issue.

Joel

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [June 18, 2026, 8:23pm UTC](https://community.localwp.com/t/obscure-mysql-error-when-trying-to-start-site/43357/14 "2026-06-18T20:23:16Z")

</div>

This topic was automatically closed after 730 days. New replies are no longer allowed.
