Update 22 Oct 2019: Instructions updated for OSX 10.15 Catalina
Mac Brew Install Mysql
After suffering some pretty bad issues with MAMP, I decided to set everything up with homebrew instead. The result was surprisingly a much faster and (in my opinion) easier to configure setup.
As a tl;dr, we’ll be setting up Homebrew MySQL and PHP and using OSX’s built in Apache.
In this tutorial I’m using the subl command which will open a file for editing in Sublime Text. If you don’t use Sublime Text, replace subl with nano or vi or any other app you use to edit text/config files.
DWQA Questions › Category: Database › After installing MySQL with homebrew on mac, how to connect database with password 0 Vote Up Vote Down Hearing the sound of the sea asked 1 year ago I installed MySQL with the following command: brew install mysql After the command installs mysql, use mysql -u root -p Neither.
Homebrew SetupMac Homebrew Tutorial
Homebrew is a package manager for OSX. It makes installation of a wide variety of useful apps super easy.
Installation instructions are on thehomebrew homepage but you can also just run the following:
MySQL
I lied! We’re installing MariaDB instead! At the time of writing MySQL version 8.0.11 has just changed its default authentication method to caching_sha2_password which isn’t supported in PHP. It’s a huge hassle so we’ll just use the drop-in replacement MariaDB instead.
Install and configure MariaDB.
Download imessages thread from mac. Add the following to the end of the file to add support for large imports:
Make MySQL start when you log in:
The default installation comes with a passwordless root user. https://everjd654.weebly.com/microsoft-usb-mouse-driver-for-mac.html. So secure it with: https://newworldof202.weebly.com/excel-vba-book-pdf.html. Easeus data recovery license key generator.
Homebrew Mysql ClientSSL
Like all developers I like working on a custom subdomain – in this case localhost.com. https://eternalnew397.weebly.com/os-121-download-mac.html. We need to create a self-signed wildcard SSL certificate and get Chrome accepting it.
Create a folder /Users/your_username/Sites/certs and inside it run the following:
This should have created two files – server.crt and server.key which will be used in the apache config below to get HTTPS up and running.
![]()
But first, because this certificate is self-signed, it’ll result in a This site’s security certificate is not trusted! Anghami free download for mac. error in Chrome. That can be fixed through adding the cert to OSX’s keychain app.
Apache and PHP
OSX 10.15 Catalina comes (at the time of writing) with Apache 2.4.41. https://eternalnew397.weebly.com/gimp-download-for-my-mac.html.
To configure apache (with SSL):
gt;
SetHandler application/x-httpd-php </FilesMatch>
# As with content, we want to load all site definitions from a Sites folder in our
# home directory. At the bottom replace the following: # Include /private/etc/apache2/other/*.conf IncludeOptional /Users/your_username/Sites/*.conf
# The error and custom logs too
CustomLog “/Users/your_username/Sites/logs/apache2/access_log” common ErrorLog “/Users/your_username/Sites/logs/apache2/error_log” Download Mysql For Mac Homebrew Version
# Uncomment to load the SSL config
Include /private/etc/apache2/extra/httpd-ssl.conf Now configure the default SSL options:
Since this is a development machine, you’ll probably also want to enable the ever popular xdebug which luckily for us comes pre-compiled with OSX. What OSX doesn’t come with, however, is a default php.ini though it does have a sample file. We can use that:
Download Mysql For Mac Using Brew
Then simply add extension=xdebug.so below all the extension= lines in your new /etc/php.ini Notepad ++ for mac. file.
VirtualHosts
I like to split virtualhosts up into one for each site and store them all in /Users/your_username/Sites/ folder.
Mac Brew Mysql
Create a file /Users/your_username/Sites/mysite.localhost.com.conf and add the following:
Dmg errata. Finally, restart apache and you should be good to go!
ResourcesHomebrew Install Mysql 5.7
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |