I’ve reinstalled ancient version of Local by Flywheel with recent Local (Lighting) and I can’t create a new site. Error related to the mysql appears
Troubleshooting Questions
Does this happen for all sites in Local, or just one in particular?
All and any site.
Are you able to create a new, plain WordPress site in Local and access it in a Browser?
No
Replication
I follow the site creation wizard, it starts provisioning and fails with the following error displayed:
Error: Command failed: /Applications/Local.app/Contents/Resources/extraResources/lightning-services/mysql-8.0.16+5/bin/darwin/bin/mysqladmin --password= ping
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
amysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/Volumes/.../Library/Application Support/Local/run/R5h2eWPSr/mysql/mysqld.' (2)'
Check that mysqld is running and that the socket: '/Volumes/.../Library/Application Support/Local/run/R5h2eWPSr/mysql/mysqld.sock' exists!
at ChildProcess.exithandler (child_process.js:304:12)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
System Details
Which version of Local is being used?
5.9.7+5156
What Operating System (OS) and OS version is being used?
MacOS Mojave 10.14.6
Attach the Local Log. See this Community Forum post for instructions on how to do so:
That folder is where Local stores the raw DB files for the site, so be careful when doing anything within those run folders.
Taking a closer look at the Local log, I’m seeing errors like this:
nginx: [emerg] too long path in the unix domain socket in upstream "unix:%%site.runData%%/php/php-fpm.socket" in %%site.runData%%/conf/nginx/site.conf:2
2021-01-07T10:51:31.439445Z 0 [ERROR] [MY-010267] [Server] The socket file path is too long (> 103): %%site.runData%%/mysql/mysqld.sock
Looking at the path you mentioned before the edit (I’ve replaced, your specifics with xes)
Have you moved the home directory to a different partition of the computer? Is there any way you can make changes so that the user directory is mounted at root?
I did recover form a crashed hard drive and it wasn’t a smooth ride. What exactly do you mean by: Is there any way you can make changes so that the user directory is mounted at root?
I can log in as a root, but what do you want me to do? I don’t follow.
I’m not sure I know what specifically to do either
Since this is a recovery from a hard-drive failure, I wonder if you can get things working by completely wiping out Local’s configuration folder and re-installing Local. Hopefully that will get things back to a clean slate. The general flow would look like:
Quit Local if it’s running
Take a backup of the ~/Library/Application\ Support/Local folder. Either copy it somewhere else or compress it to a file
Delete the ~/Library/Application\ Support/Local folder
Start Local and try to create a new site
If that gives you a site that works, then you should be able to restore the original site to a new one in Local by using a backup of the site, or by using the files for the site by following the steps outlined in the “Restoring From Only Local Site files” section of this help doc:
The only way to completely clear out Local’s settings is to remove Local’s configuration folder:
~/Library/Application\ Support/Local
The latest version of Local doesn’t store any additional information in other locations.
Local Classic (under 3.3.1) stored configuration in a similar location, but it wouldn’t emit this sort of error of the unix path being too long. For completeness though, here’s where the classic configuration is located:
I’ve uninstalled Local (Lightning), I’ve deleted the ~/Local\ Sites, ~/Library/Application\ Support/Local, ~/.docker/machine/machines/local-by-flywheel. The ~/Library/Application\ Support/Local\ by\ Flywheel was already gone.
I’ve installed the new version of Local Lightning using brew install --cask local
When I try to create a site using my user account, I get the error mentioned in the original post
If I try to do it from another account on my computer. It works, except I get a warning that I can’t use local domains that there’s some conflict on port 80 and whether I’d like to use localhost instead BUT the site gets created. There’s a port conflict with this site’s domain. Learn more. >Use Localhost<
However, if I try to access the site (after enabling the localhost routing mode), I get Error 402
EDIT:
I got it working for the other user on my computer. Now, I just need to get it working under my user. What am I missing? Why does it keep happening even if I wipe out all the related files from the Library, etc.???
I really don’t get it, why it’s not working on my normal user and how come I can’t do a clean install. I would really rather NOT migrate to a clean account. Anything you can suggest to clean my current one?