Mysql Download Mac Os X 10.6

Go your Local Web Development Environment Up & Running on macOS Big Sur 11 and Catalina ten.fifteen

Macos Install Big Sur

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

This guide will also work on macOS Catalina and Mojave.

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

Apache/WebSharing

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

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

For those not familiar with the Terminal, information technology really isn't as intimidating as you may remember, in one case launched you are faced with a command prompt waiting for your commands - just type/paste in a command and hit enter, some commands give y'all no response - information technology 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 you will demand to confirm with your admin password or iCloud countersign if set up that way.... let's get to it ...

to start Apache spider web sharing

sudo apachectl first

to stop information technology

sudo apachectl stop

to restart it

sudo apachectl restart

To find 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 - test to see if the webserver is working in the browser - http://localhost - yous should see the "Information technology Works!" text.

If yous don't get the localhost examination, you can attempt troubleshooting Apache to run into if there is anything wrong in its config file by running

apachectl configtest

This will give yous an indication of what might exist 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 spider web roots one at a organisation level and 1 at a user level - you can ready both up or just run with one, the user level one allows multiple accounts to accept their own spider web root whilst the organisation one is global for all users. It seems there is less endeavor from Apple in continuing with the user level one just information technology still tin can exist set up with a couple of extra tweaks in configuration files. It is easier to use the user level one as you don't accept to go on on authenticating as an admin user.

System Level Web Root

- the default organisation 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 flake longer to set but some users are very accustomed to using it.

You need to make a "Sites" binder at the root level of your account and and so it volition work. One time you brand the Sites binder you lot will discover that information technology has a unique icon which is a throwback from a few versions older. Make that folder before you lot ready the user configuration file described next.

You have to brand 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 take 1 (very likely), then create one named by the brusque username of the account with the suffix .conf, its location and permissions/buying is best tackled past using the Terminal, the text editor 'nano' would be the best tool to deal with this.

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

Bbedit Macos Bigsur Editing

Launch Terminal, (Applications/Utilities), and follow the commands below, first one gets you to the right spot, second one opens the text editor on the command line (swap 'username' with your account'southward shortname, if you lot don't know your account shortname blazon 'whoami' the Final prompt):

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

So add the content below swapping in your 'username' in the code below, at that place is a slightly unlike user directive for Big Sur and Catalina, make sure 'Require 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  bike  298 Jun 28 16:47 username.conf

If non, you demand to change it...

sudo chmod 644 username.conf

Open up the main httpd.conf and allow some modules:

sudo nano /etc/apache2/httpd.conf

And brand sure these modules are uncommented (the first 2 should already exist 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.so

While you take this file open as well to go php running, uncomment the below ... (Mentioned also in the PHP role of the article).

LoadModule php7_module libexec/apache2/libphp7.then

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

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

Relieve all your changes (Control + O in nano)

Then open another Apache config file and uncomment another file:

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

And uncomment:

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

Salvage all your changes (Control + O in nano)

Restart Apache for the new file to be read:

sudo apachectl restart

Then this user level document root will be viewable at:

http://localhost/~username/

Yous should only see 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 employ the web serving document root at /Library/WebServer/Documents information technology is a good thought to allow any .htaccess files used to override the default settings - this can be achieved 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 post-obit the previous step.

sudo nano /etc/apache2/httpd.conf        

Osx Htaccess Override

As well while here allow URL rewrites so your permalinks look clean, not ugly.

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

LoadModule rewrite_module libexec/apache2/mod_rewrite.then

PHP

PHP vii.3.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 land you on the right line then uncomment the line (remove the #):

LoadModule php7_module libexec/apache2/libphp7.and so

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

Reload Apache to kick in

sudo apachectl restart

To come across and test PHP, create a file proper name it "phpinfo.php" and file information technology in your document root with the contents below, and so view it in a browser.

          <?php phpinfo(); ?>

Macos Php Legacy

Hither you lot will see that Apple tree are not intending on bundling PHP in the macOS in the future, possibly with the next incarnation of the Os, but for at present it's working albeit not version 7.four. However you tin can utilize a Homebrew PHP solution that allows for any 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 exist removed in time to come 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 be dowloaded from the MySQL site.

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

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

Macos Mysql Download

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

Likewise if you have a clean install and want the earlier MySQL version five.7, you can however get this from the MySQL site - from the 'Looking for previous GA versions' link. (MySQL 8 is relatively new and non in many production set ups)

Mysql Product Archives

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

When downloading you don't accept to sign up, look for » No thanks, just showtime mydownload - go direct to the download.

Once downloaded open up the .dmg and run the installer.

During the MySQL process you are prompted to choose between stiff and legacy password encryptions, since version 8 is entirely new, some software similar phpMyAdmin tin't connect with the newer encryptions - and then if y'all are going to apply a GUI wrapper like phpMyadmin I advise you stick to legacy.

Macos Bigsur Mysql Legacy Password

Then add a countersign for the MySQL root user.

Macos Bigsur Mysql Root Password

Add together Mysql to your path

Afterward installation, in order to use 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 crush contour ".zshrc" file in your home directory (previous shells were bash ), if you don't have that file but create it using half dozen or nano:

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

The commencement control brings you lot to your home directory and opens the .zsh file or creates a new one if it doesn't exist, then add together in the line above which adds the MySQL binary path to commands that you can run. Leave the file with blazon "control + x" and when prompted to save the alter by typing "y". The last thing to do here is to reload the vanquish for the above to 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 procedure would fail - hence the info below. This newer version, nevertheless, seems to piece of work).

Note that this is not the same 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

Start it in safe mode:

sudo mysqld_safe --skip-grant-tables

This will be an ongoing command until the process is finished so open another shell/terminal window, and log in without a password as root:

mysql -u root
Affluent PRIVILEGES;
Change USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

Change the lowercase 'MyNewPass' to what y'all want - and keep the single quotes.

\q

Start MySQL

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

Starting MySQL

Macos Mysql Start Stop

Y'all can then outset the MySQL server from the Organization Preferences adds to the last row or via the command line.

Macos Mysql Sys Pref

The new MySQL arrangement preference also has the uninstall feature - useful if you've installed it with a security encryption that's not working for you and want to try the other one. You can also see the paths to the config and data sources of MySQL in the configuration tab.

Or to Command line start MySQL.

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

To find the MySQL version from the final, type at the prompt:

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

This too puts yous into a shell interactive dialogue with MySQL, type \q to leave.

Set the 2002 MySQL Socket error

Set up 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 it in /var/mysql the socket is a type of file that allows MySQL customer/server communication.

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

phpMyAdmin

Offset ready the 2002 socket error if you oasis't done so from the MySQL section-

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

Macos Phpmyadmin Download

Download phpMyAdmin, the null English language package will suit a lot of users, so unzip it and move the binder with its contents into the document root level renaming folder to 'phpmyadmin'.

Make the config binder

mkdir ~/Sites/phpmyadmin/config

Change the permissions

chmod o+w ~/Sites/phpmyadmin/config

Run the set upwardly in the browser

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

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


Switch to the Authentication tab and set the local MySQL root user and the countersign.
Add in the username "root" (peradventure already populated, add in the countersign that you ready upwardly earlier for the MySQL root user fix, click on save and y'all 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 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 exist writeable past all since it's a local development it shouldn't be a security effect.

Permit'south say that you accept a site in the User Sites folder at the post-obit location ~/Sites/testsite you would set it to be writeable like and then:

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

If you are concerned about security then instead of making it world writeable yous can ready the owner to be Apache _www but when working on files you would have to authenticate more as admin you are "not" the owner, you lot would do this like and so:

sudo chown -R _www ~/Sites/testsite

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

If y'all had the website stored at the System level Certificate root at say /Library/WebServer/Documents/testsite then it would take to be the latter:

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

Another more than straightforward manner to do this if you have 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 set up vritual hosts aka vhosts on Apache cheque the guide here.

If you are a WordPress user and want a smooth lean local evolution environs - also worth checking out is Laravel Valet which runs on acme of macOS - check out my Valet WordPress Guide on macOS.

Mysql Download Mac Os X 10.6

Posted by: mastrangeloefece1947.blogspot.com