Download Mysql for Mac Os X 10.6.8 Updated

Download Mysql for Mac Os X 10.6.8

Get your Local Spider web Development Environment Up & Running on macOS Big Sur xi and Catalina 10.15

Macos Install Big Sur

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

This guide will also work on macOS Catalina and Mojave.

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

Apache/WebSharing

Web serving is built into Big Sur with Apache app, information technology is installed ready to exist fired upwardly.

This needs to exist done in the Terminal which is found in the Bone filing organization at /Applications/Utilities/Terminal

For those non familiar with the Terminal, information technology really isn't as intimidating equally you may recall, one time launched yous are faced with a control prompt waiting for your commands - just type/paste in a command and striking enter, some commands give yous no response - it simply 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 you will need to ostend with your admin countersign or iCloud password if set up that way.... permit's get to it ...

to start Apache web sharing

sudo apachectl get-go

to terminate it

sudo apachectl stop

to restart it

sudo apachectl restart

To discover the Apache version

httpd -v

The Apache version that comes in macOS Big Sur is Apache/2.4.46

Bigsur Macos It Works Webroot

After starting Apache - examination to encounter if the webserver is working in the browser - http://localhost - you lot should see the "It Works!" text.

If yous don't get the localhost exam, you can try troubleshooting Apache to see if at that place is annihilation wrong in its config file by running

apachectl configtest

This volition give you lot an indication of what might exist incorrect.

Certificate Root

Certificate root is the location where the files are shared from the file arrangement and is similar to the traditional names of 'public_html' and 'htdocs', macOS has historically had 2 web roots ane at a system level and ane at a user level - you tin set both up or but run with one, the user level one allows multiple accounts to have their own web root whilst the system one is global for all users. Information technology seems there is less attempt from Apple in continuing with the user level i but information technology still can be set up with a couple of actress tweaks in configuration files. It is easier to employ the user level i as you don't accept to keep on authenticating as an admin user.

System Level Web Root

- the default arrangement certificate root is still found at -

http://localhost/

The files are shared in the filing system at -

/Library/WebServer/Documents/

User Level Root

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

Y'all need to make a "Sites" folder at the root level of your account and then information technology will piece of work. In one case you make the Sites binder you will notice that it has a unique icon which is a throwback from a few versions older. Make that folder before you ready the user configuration file described next.

Y'all have to make a few additional tweaks to go the ~/Sites binder back upwardly and running.

Big sur Sites User Folder

Add a "username.conf" filed under:

/etc/apache2/users/

If you don't already take ane (very probable), so create one named past the short username of the account with the suffix .conf, its location and permissions/ownership is best tackled by using the Terminal, the text editor 'nano' would be the best 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 complimentary BBEdit which allows you to open hidden system files.

Bbedit Macos Bigsur Editing

Launch Concluding, (Applications/Utilities), and follow the commands below, showtime one gets y'all to the right spot, 2d one opens the text editor on the control line (bandy 'username' with your account'due south shortname, if you don't know your account shortname blazon 'whoami' the Final 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 different 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--   1 root  wheel  298 Jun 28 16:47 username.conf

If not, you need to change it...

sudo chmod 644 username.conf

Open the main 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 make clean install):

LoadModule authz_core_module libexec/apache2/mod_authz_core.and 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.and so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so

While y'all have this file open also to go php running, uncomment the below ... (Mentioned also in the PHP part of the article).

LoadModule php7_module libexec/apache2/libphp7.so

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

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

Save all your changes (Command + O in nano)

And so open another Apache config file and uncomment another file:

sudo nano /etc/apache2/extra/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 exist read:

sudo apachectl restart

Then this user level document root will be viewable at:

http://localhost/~username/

You should simply run across a directory tree like structure if the folder is empty.

Macos User Web Root

Override .htaccess and allow URL Rewrites

If yous are going to apply the web serving document root at /Library/WebServer/Documents information technology is a good idea to permit whatever .htaccess files used to override the default settings - this tin can be accomplished by editing the httpd.conf file at line 217 and setting the AllowOverride to All and then restart Apache. This is already taken care of at the Sites level webroot by following the previous step.

sudo nano /etc/apache2/httpd.conf        

Osx Htaccess Override

Also while here permit URL rewrites so your permalinks wait make clean, not ugly.

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

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

PHP

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

sudo nano /etc/apache2/httpd.conf

Use "control" + "w" to search inside nano and search for 'php' this volition land you on the right line then uncomment the line (remove the #):

LoadModule php7_module libexec/apache2/libphp7.so

Write out and Save using the nano shortcut keys at the bottom 'control o' and 'control x'

Reload Apache to boot in

sudo apachectl restart

To see and test PHP, create a file name it "phpinfo.php" and file it in your document root with the contents below, then view it in a browser.

          <?php phpinfo(); ?>

Macos Php Legacy

Hither you will run across that Apple tree are not intending on bundling PHP in the macOS in the futurity, possibly with the next incarnation of the OS, but for now it'southward working albeit not version 7.4. However you can use a Homebrew PHP solution that allows for whatsoever 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 7.3.24-(to exist removed in future macOS) (cli) (built: 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 exist 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 Large Sur).

Macos Mysql Download

If yous are upgrading from a previous macOS and have an older MySQL version y'all practise non have to update it.

Too if yous have a clean install and desire the before MySQL version five.7, you can still become this from the MySQL site - from the 'Looking for previous GA versions' link. (MySQL 8 is relatively new and not in many product ready ups)

Mysql Product Archives

One thing with MySQL upgrades, ever have a information dump of your database in case things go south and before you upgrade to macOS Catalina make certain your MySQL Server is non running.

When downloading you don't have to sign up, await for » No thanks, just start mydownload - get straight to the download.

Once downloaded open the .dmg and run the installer.

During the MySQL process yous are prompted to choose between strong and legacy password encryptions, since version viii is entirely new, some software like phpMyAdmin tin can't connect with the newer encryptions - so if y'all are going to use a GUI wrapper similar phpMyadmin I suggest you lot stick to legacy.

Macos Bigsur Mysql Legacy Password

And so add a countersign for the MySQL root user.

Macos Bigsur Mysql Root Password

Add together Mysql to your path

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

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

The first command brings yous to your dwelling directory and opens the .zsh file or creates a new 1 if it doesn't exist, then add in the line above which adds the MySQL binary path to commands that y'all can run. Get out the file with type "control + x" and when prompted to relieve the change by typing "y". The last matter to do here is to reload the shell for the to a higher place to piece of work directly 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 beneath. This newer version, however, seems to work).

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

Terminate MySQL

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

Kickoff information technology in safe way:

sudo mysqld_safe --skip-grant-tables

This will be an ongoing command until the process is finished so open some other beat/last window, and log in without a password every bit root:

mysql -u root
Flush PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

Modify the lowercase 'MyNewPass' to what you want - and proceed the unmarried quotes.

\q

Start MySQL

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

Starting MySQL

Macos Mysql Start Stop

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

Macos Mysql Sys Pref

The new MySQL system preference also has the uninstall feature - useful if you've installed information technology with a security encryption that's not working for you and want to endeavor the other one. You tin also meet the paths to the config and information sources of MySQL in the configuration tab.

Or to Command line start MySQL.

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

To discover the MySQL version from the last, blazon at the prompt:

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

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

Fix the 2002 MySQL Socket mistake

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

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

phpMyAdmin

First fix the 2002 socket error if yous haven't done so from the MySQL section-

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

Macos Phpmyadmin Download

Download phpMyAdmin, the zip English packet will arrange a lot of users, then unzip it and move the binder 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+westward ~/Sites/phpmyadmin/config

Run the set up 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 in the username "root" (maybe already populated, add together in the countersign that yous fix up earlier for the MySQL root user set up, click on salvage and you are returned to the previous screen.
(This is non the macOS Admin or root password - it is the MySQL root user)

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

Macos Phpmyadmin

Permissions

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

Let's say that you have a site in the User Sites folder at the post-obit location ~/Sites/testsite you would set information technology to be writeable similar so:

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

If y'all are concerned about security then instead of making information technology world writeable you lot tin set the owner to be Apache _www but when working on files y'all would have to authenticate more every bit admin you are "not" the possessor, you would do this similar then:

sudo chown -R _www ~/Sites/testsite

This volition set the contents recursively to be owned by the Apache user.

If yous had the website stored at the Arrangement level Document root at say /Library/WebServer/Documents/testsite then it would have to be the latter:

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

Another more straightforward manner to practise this if y'all have a one user workstation is to change the Apache web user from _www to your business relationship.

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

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

If you are a WordPress user and want a shine lean local development environment - likewise worth checking out is Laravel Valet which runs on superlative of macOS - check out my Valet WordPress Guide on macOS.

Download Mysql for Mac Os X 10.6.8

Posted by: driscollwifilbeem.blogspot.com

Post a Comment

Previous Post Next Post

Iklan Banner setelah judul