Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Mike_SA's avatar

Valet, PHP installation appears to be missing the MySQL extension

Hi,

I have just upgraded to Mojave Mac OS and have moved from Laravel Homestead to Valet.

Everything appears to be running fine except for the MySQL.

The strange things is that using Sequel Pro, I can access the MySQL database.

I have tried both Laravel installations and Wordpress installations and get the same error.

"PHP installation appears to be missing the MySQL extension"

Has anyone experienced this before?

Thanks in advance :)

0 likes
7 replies
Mike_SA's avatar

I did a check and can see that the root is set to my computer name but not sure how to change this

$ brew services list Name Status User Plist dnsmasq started root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist

[email protected] started michaelburton/Users/michaelburton/Library/LaunchAgents/[email protected]

nginx started root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist

php started root /Library/LaunchDaemons/homebrew.mxcl.php.plist "

skoobi's avatar

Youll have to look it up a bit further but this may help put you on the right track. If Mysql is missing then you may be able to reinstall php with the extension​, or just reinstall php

brew reinstall php72 --with-libmysql

Mike_SA's avatar

@SKOOBI - Thank you so much :)

Unfortunately it did not work, it returned:

Error: invalid option: --with-libmysql

Maybe best to start from scratch and see if that works

skoobi's avatar

Hmm. I just checked through the Brew commands and you could try brew upgrade php and see what that comes up with. Or brew doctor to see if theres any issues with it.

Mike_SA's avatar

Thanks so much. I did a complete reinstall last night, still the same issue with MySQL. Brew doctor saying nothing is wrong...

Tried Homestead, I forget the error but it was to the effect that it is not compatible with Mojave... May have to go back to Camp which I have not used for a few years :D

Thank you for all the help :)

skoobi's avatar

Ah if you dig around, there is a fix for the Mojave issue. I had the same issue but found a solution. I’ll see if I can find it for you in the morning

Mike_SA's avatar

Thank you so much :)

I managed to get everything up and running after a complete format of the SSD and installed my dev environment first then all other programs.

Did everything though Homebrew following this post, https://threenine.co.uk/add-laravel-to-path-on-mac-osx/.

There were a couple of missing things like generating a key etc but it worked.

The only thing to note is the connection to the DB is no longer 127.0.01 like it used to be for me. I have to use the IP address provided in the homestead.yaml file.

Hopefully this will help others with similar issues :)

1 like

Please or to participate in this conversation.