keropsx.blogg.se

Setting up mysql on mac
Setting up mysql on mac








  1. SETTING UP MYSQL ON MAC INSTALL
  2. SETTING UP MYSQL ON MAC SOFTWARE

Now the webroot is /Users/ shortusername/Sites/ just add a index.html file there and view file via localhost/index.html in your browser Apache Log File # AllowOverride FileInfo AuthConfig Limitįind: #ServerName Change: ServerName localhostįind and uncomment: LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so # It can be "All", "None", or any combination of the keywords: # AllowOverride controls what directives may be placed in. In the /usr/local/etc/httpd/nf file, find: DocumentRoot "/usr/local/var/www"Ĭhange to: DocumentRoot /Users/ shortusername/SitesĬhange the shortusername to the one on your macOS account

setting up mysql on mac

Make that folder before you set up the configuration changes below Once you make the Sites folder you will notice that it has a unique icon which is a throwback from a few versions older. You need to make a “ Sites” folder at the root level of your account and then it will work. This makes sense to set up as a document root as it is logical and easily accessible. Previously in macOS the web root directory which is missing by default is the ‘ ~/Sites’ folder in the User account. brew services restart httpd Changing the document root to be the old sites folder Restart Apache and web files will now be served over the default port 80. Next is to change the port numbers from 8080 to 80 nano /usr/local/etc/httpd/nf Restart the computer and try the location test again. If you are getting the default macOS location of /usr/sbin/httpd: /usr/sbin/httpd

setting up mysql on mac

Homebrew location is: /usr/local/bin/httpd Test the location of Apache/httpd which httpd The other 2 commands to stop or Restart Apache are: brew services stop httpdīy default the Apache Homebrew package is listening on Port 80, test by issuing: sudo lsof -i:8080 Set Apache to auto-start now and on computer restart: brew services start httpd Or, if you don't want/need a background service you can just run: To have launchd start httpd now and restart at login: usr/local/etc/httpd/extra/nf to 8443 so that httpd can run without sudo. The default ports have been set in /usr/local/etc/httpd/nf to 8080 and in

setting up mysql on mac

SETTING UP MYSQL ON MAC INSTALL

Install Apache which is known as the package name ‘httpd’: brew install httpdįinal command line output should be: DocumentRoot is /usr/local/var/www. That will unload the start up daemon and make the builtin macOS Apache incapacitated, test by issuing the previous command: sudo lsof -i:80 Installing Apache with Homebrewįirst make sure you have Homebrew set up and ready to go.

setting up mysql on mac

Stop Apache running on computer restart by issuing: sudo launchctl unload -w /System/Library/LaunchDaemons/ This tells us that indeed httpd/Apache is running, no output would mean it’s not running. Output you may get back would be: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME You can test if Apache is running by issuing this command, which is checking Port 80: sudo lsof -i:80 or 2.4.48 Remove built-in Apache in macOS For MySQL/MariaDB you can either also install from Homebrew or as a standalone package.įirst thing to do would be to remove the builtin Apache version of which in macOS Monterey Big Sur is Apache/2.4.46. In this guide we look to add both MySQL and PHP and structure the workflow to use the User Sites folder as the document root. MacOS use to ship with both MySQL & PHP, but now since macOS Monterey, PHP has also been deprecated.

SETTING UP MYSQL ON MAC SOFTWARE

Eventhough Apache ships with macOS, a better maintained version would be coming from Homebrew, also Apple is making noises about not supporting legacy software like PHP so in the future this may be more of a compulsory option.










Setting up mysql on mac