Mysql Download Mac Os X 10.10 Updated

Mysql Download Mac Os X 10.10

Get your Local Web Development Environment Up & Running on macOS Big Sur xi and Catalina x.fifteen

Macos Install Big Sur

With Apples' new macOS Big Sur 11 available for download, here is how to get the AMP stack up and running on the new macOS. This tutorial will go through the process of getting Apache, MySQL, PHP (or otherwise known as the 'AMP' stack) and phpMyAdmin running on the new mac OS Large Sur.

This guide volition also work on macOS Catalina and Mojave.

This tutorial sets upwardly the AMP stack in more of a traditional way using the loaded Apache and PHP and downloading MySQL and phpMyAdmin.

Apache/WebSharing

Web serving is built into Big Sur with Apache app, it is installed ready to be fired up.

This needs to exist done in the Concluding which is found in the OS filing system at /Applications/Utilities/Terminal

For those not familiar with the Terminal, it really isn't as intimidating as you lot may think, once launched you are faced with a control prompt waiting for your commands - merely type/paste in a command and hit enter, some commands give you lot no response - it just means the command is done, other commands give you feedback.

Using the prefix of sudo is required for commands that accept their applications protected in specific folders - when using sudo yous will demand to confirm with your admin password or iCloud password if set that mode.... let's get to information technology ...

to start Apache web sharing

sudo apachectl offset

to stop it

sudo apachectl stop

to restart it

sudo apachectl restart

To discover the Apache version

httpd -v

The Apache version that comes in macOS Large Sur is Apache/two.4.46

Bigsur Macos It Works Webroot

After starting Apache - test to see if the webserver is working in the browser - http://localhost - y'all should see the "Information technology Works!" text.

If you don't go the localhost test, you can try troubleshooting Apache to see if there is anything incorrect in its config file by running

apachectl configtest

This volition give you an indication of what might be wrong.

Document Root

Document root is the location where the files are shared from the file system and is similar to the traditional names of 'public_html' and 'htdocs', macOS has historically had two web roots one at a system level and one at a user level - you can gear up both up or just run with one, the user level 1 allows multiple accounts to accept their ain spider web root whilst the organisation ane is global for all users. It seems at that place is less try from Apple in standing with the user level one but information technology still can be set up up with a couple of extra tweaks in configuration files. It is easier to use the user level one as yous don't have to keep on authenticating as an admin user.

Organization Level Spider web Root

- the default system document root is however found at -

http://localhost/

The files are shared in the filing system at -

/Library/WebServer/Documents/

User Level Root

The other spider web root directory which is missing by default is the '~/Sites' folder in the User account. This takes a bit longer to ready but some users are very accustomed to using it.

Yous need to brand a "Sites" binder at the root level of your account so it will work. In one case yous make the Sites folder you lot will observe that it has a unique icon which is a throwback from a few versions older. Make that folder before you set upwards the user configuration file described next.

You accept to make a few additional tweaks to get the ~/Sites binder back up and running.

Big sur Sites User Folder

Add a "username.conf" filed under:

/etc/apache2/users/

If you don't already have one (very likely), then create one named by the short username of the business relationship with the suffix .conf, its location and permissions/buying is best tackled past using the Terminal, the text editor 'nano' would be the all-time tool to bargain with this.

If you would rather edit config files in a text editor equally an app I would suggest text editor like the free BBEdit which allows you to open hidden system files.

Bbedit Macos Bigsur Editing

Launch Terminal, (Applications/Utilities), and follow the commands beneath, first one gets yous to the right spot, 2nd one opens the text editor on the command line (swap 'username' with your business relationship's shortname, if yous don't know your business relationship shortname blazon 'whoami' the Terminal prompt):

cd /etc/apache2/users
sudo nano username.conf

Then add the content below swapping in your 'username' in the code beneath, there is a slightly dissimilar user directive for Big Sur and Catalina, make certain 'Crave host localhost' is used:

<Directory "/Users/username/Sites/"> AllowOverride All Options Indexes MultiViews FollowSymLinks Require host localhost </Directory>

Permissions on the file should be:

-rw-r--r--   one root  wheel  298 Jun 28 16:47 username.conf

If non, you need to change information technology...

sudo chmod 644 username.conf

Open the principal httpd.conf and allow some modules:

sudo nano /etc/apache2/httpd.conf

And make sure these modules are uncommented (the first 2 should already be on a clean install):

LoadModule authz_core_module libexec/apache2/mod_authz_core.so
LoadModule authz_host_module libexec/apache2/mod_authz_host.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule include_module libexec/apache2/mod_include.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.then

While you have this file open also to get php running, uncomment the below ... (Mentioned also in the PHP office of the article).

LoadModule php7_module libexec/apache2/libphp7.and then

And also uncomment this configuration file besides in httpd.conf - which allows user home directories.

Include /private/etc/apache2/actress/httpd-userdir.conf

Save all your changes (Control + O in nano)

So open another Apache config file and uncomment some other file:

sudo nano /etc/apache2/actress/httpd-userdir.conf

And uncomment:

Include /private/etc/apache2/users/*.conf

Save all your changes (Control + O in nano)

Restart Apache for the new file to be read:

sudo apachectl restart

And so this user level document root will be viewable at:

http://localhost/~username/

You should only encounter a directory tree like structure if the binder is empty.

Macos User Web Root

Override .htaccess and let URL Rewrites

If yous are going to use the spider web serving certificate root at /Library/WebServer/Documents it is a good thought to allow any .htaccess files used to override the default settings - this can be accomplished past editing the httpd.conf file at line 217 and setting the AllowOverride to All and so restart Apache. This is already taken care of at the Sites level webroot by following the previous stride.

sudo nano /etc/apache2/httpd.conf        

Osx Htaccess Override

Also while hither allow URL rewrites so your permalinks look clean, non ugly.

Uncomment in httpd.conf - should exist uncommented on a clean instal50.

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

PHP

PHP 7.three.24 is loaded in this version of macOS Big Sur and needs to be turned on past uncommenting a line in the httpd.conf file.

sudo nano /etc/apache2/httpd.conf

Use "control" + "west" to search within nano and search for 'php' this will state yous on the right line then uncomment the line (remove the #):

LoadModule php7_module libexec/apache2/libphp7.so

Write out and Relieve using the nano shortcut keys at the bottom 'command o' and 'control 10'

Reload Apache to kick in

sudo apachectl restart

To see and test PHP, create a file proper name it "phpinfo.php" and file it in your certificate root with the contents beneath, and so view it in a browser.

          <?php phpinfo(); ?>

Macos Php Legacy

Here you will come across that Apple are not intending on bundling PHP in the macOS in the hereafter, maybe with the next incarnation of the Bone, but for now information technology'due south working albeit not version seven.four. Notwithstanding you lot can utilize a Homebrew PHP solution that allows for whatever PHP version to be used.

          [email protected]          Documents % php -v WARNING: PHP is not recommended PHP is included in macOS for compatibility with legacy software. Future versions of macOS will not include PHP. PHP vii.3.24-(to be removed in hereafter macOS) (cli) (congenital: Dec 21 2020 21:33:25) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies        

MySQL

MySQL doesn't come pre-loaded with macOS Big Sur and needs to be dowloaded from the MySQL site.

The latest version of MySQL 8.0.23 does piece of work with the latest release of macOS.

Use the macOS 10.fifteen (x86, 64-bit), DMG Archive version (works on macOS Big Sur).

Macos Mysql Download

If you lot are upgrading from a previous macOS and have an older MySQL version you lot practise not have to update it.

Also if you accept a clean install and desire the earlier MySQL version 5.7, yous tin can even so get this from the MySQL site - from the 'Looking for previous GA versions' link. (MySQL eight is relatively new and not in many production prepare ups)

Mysql Product Archives

One affair with MySQL upgrades, always take a data dump of your database in example things go south and before you upgrade to macOS Catalina make sure your MySQL Server is not running.

When downloading you don't have to sign up, look for » No thanks, just start mydownload - go directly to the download.

Once downloaded open the .dmg and run the installer.

During the MySQL procedure you are prompted to choose betwixt strong and legacy password encryptions, since version 8 is entirely new, some software similar phpMyAdmin can't connect with the newer encryptions - so if yous are going to utilise a GUI wrapper like phpMyadmin I advise you lot stick to legacy.

Macos Bigsur Mysql Legacy Password

Then add a password for the MySQL root user.

Macos Bigsur Mysql Root Password

Add Mysql to your path

Subsequently installation, in order to employ MySQL commands without typing the full path to the commands you need to add together the mysql directory to your shell path, (optional stride) this is done in your Zsh crush profile ".zshrc" file in your habitation directory (previous shells were bash ), if you don't have that file just create it using vi or nano:

cd ; nano .zshrc
consign PATH="/usr/local/mysql/bin:$PATH"

The start command brings you to your dwelling directory and opens the .zsh file or creates a new one if it doesn't exist, so add together in the line above which adds the MySQL binary path to commands that you can run. Exit the file with blazon "control + ten" and when prompted to save the change by typing "y". The last thing to do here is to reload the crush for the above to work straight away.

source ~/.zshrc

Change the MySQL root password

(This section is left in for reference - in previous macOS MySQL packages the password set during the installation process would fail - hence the info below. This newer version, yet, seems to piece of work).

Note that this is not the aforementioned as the root or admin countersign of macOS - this is a unique password for the MySQL root user.

Stop MySQL

sudo /usr/local/mysql/support-files/mysql.server stop

Kickoff it in safe manner:

sudo mysqld_safe --skip-grant-tables

This will be an ongoing control until the procedure is finished and then open up another vanquish/terminal window, and log in without a password as root:

mysql -u root
FLUSH PRIVILEGES;
Alter USER 'root'@'localhost' IDENTIFIED Past 'MyNewPass';

Change the lowercase 'MyNewPass' to what you desire - and keep the single quotes.

\q

Start MySQL

sudo /usr/local/mysql/support-files/mysql.server start

Starting MySQL

Macos Mysql Start Stop

You can then start the MySQL server from the Organisation Preferences adds to the terminal row or via the command line.

Macos Mysql Sys Pref

The new MySQL organisation preference as well has the uninstall feature - useful if y'all've installed it with a security encryption that's non working for you lot and want to effort the other 1. Yous can also encounter the paths to the config and data sources of MySQL in the configuration tab.

Or to Command line offset MySQL.

sudo /usr/local/mysql/support-files/mysql.server first

To detect the MySQL version from the terminal, type at the prompt:

/usr/local/mysql/bin/mysql -v -uroot -p

This also puts you into a shell interactive dialogue with MySQL, type \q to exit.

Gear up the 2002 MySQL Socket error

Fix the looming 2002 socket error - which is linking where MySQL places the socket and where macOS thinks it should be, MySQL puts it in /tmp and macOS looks for information technology in /var/mysql the socket is a blazon of file that allows MySQL client/server communication.

sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

phpMyAdmin

First fix the 2002 socket error if you oasis't done then from the MySQL section-

sudo mkdir /var/mysql
sudo ln -southward /tmp/mysql.sock /var/mysql/mysql.sock

Macos Phpmyadmin Download

Download phpMyAdmin, the zero English package will adjust a lot of users, then unzip it and move the folder with its contents into the document root level renaming folder to 'phpmyadmin'.

Make the config folder

mkdir ~/Sites/phpmyadmin/config

Change the permissions

chmod o+w ~/Sites/phpmyadmin/config

Run the set upwards in the browser

http://localhost/~username/phpmyadmin/setup/ or http://localhost/phpmyadmin/setup/

You need to create a new localhost mysql server connection, click new server.


Switch to the Authentication tab and set the local MySQL root user and the password.
Add together in the username "root" (maybe already populated, add in the password that you set earlier for the MySQL root user set up, click on salvage and you are returned to the previous screen.
(This is not the macOS Admin or root password - information technology is the MySQL root user)

Now going to http://localhost/~username/phpmyadmin/ will now let you to interact with your MySQL databases.

Macos Phpmyadmin

Permissions

To run a website with no permission issues information technology is best to set the web root and its contents to be writeable by all since it's a local development information technology shouldn't be a security issue.

Allow'due south say that you accept a site in the User Sites folder at the post-obit location ~/Sites/testsite you would set information technology to be writeable like so:

sudo chmod -R a+w ~/Sites/testsite

If y'all are concerned about security then instead of making it world writeable you can set the owner to be Apache _www simply when working on files you would have to cosign more as admin you are "not" the owner, y'all would practise this like so:

sudo chown -R _www ~/Sites/testsite

This will gear up the contents recursively to exist endemic by the Apache user.

If you had the website stored at the System level Document root at say /Library/WebServer/Documents/testsite then information technology would have to be the latter:

sudo chown -R _www /Library/WebServer/Documents/testsite

Another more straightforward way to practice this if you accept a one user workstation is to change the Apache web user from _www to your account.

That's it! You now have the native AMP stack running on top of macOS Big Sur or Catalina.

To fix up vritual hosts aka vhosts on Apache check the guide here.

If y'all are a WordPress user and want a polish lean local evolution environment - as well worth checking out is Laravel Valet which runs on top of macOS - bank check out my Valet WordPress Guide on macOS.

Mysql Download Mac Os X 10.10

Posted by: hankinsmatifens.blogspot.com

Post a Comment

Previous Post Next Post

Iklan Banner setelah judul