Download Mysql for Mac Os X 10.6 Updated

Download Mysql for Mac Os X 10.6

Go your Local Web Development Environment Up & Running on macOS Big Sur 11 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 upward 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 Bone Big Sur.

This guide will besides 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, it is installed ready to be fired upwardly.

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

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

Using the prefix of sudo is required for commands that have their applications protected in specific folders - when using sudo you volition need to confirm with your admin password or iCloud password if set up that way.... let's become to information technology ...

to start Apache web sharing

sudo apachectl start

to stop it

sudo apachectl stop

to restart it

sudo apachectl restart

To detect the Apache version

httpd -v

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

Bigsur Macos It Works Webroot

Later starting Apache - examination to encounter if the webserver is working in the browser - http://localhost - y'all should see the "It Works!" text.

If you don't get the localhost test, y'all can try troubleshooting Apache to encounter if at that place is anything wrong in its config file by running

apachectl configtest

This will give you an indication of what might be incorrect.

Document Root

Document root is the location where the files are shared from the file organization and is similar to the traditional names of 'public_html' and 'htdocs', macOS has historically had ii web roots 1 at a arrangement level and one at a user level - you lot tin can set both upwardly or just run with one, the user level 1 allows multiple accounts to have their ain web root whilst the system i is global for all users. It seems at that place is less effort from Apple in standing with the user level one merely it nevertheless can exist gear up with a couple of actress tweaks in configuration files. Information technology is easier to use the user level ane equally you don't accept to keep on authenticating equally an admin user.

System Level Spider web Root

- the default organization document root is notwithstanding found at -

http://localhost/

The files are shared in the filing organization at -

/Library/WebServer/Documents/

User Level Root

The other web root directory which is missing past default is the '~/Sites' folder in the User business relationship. This takes a chip longer to set but some users are very accepted to using information technology.

You demand to make a "Sites" folder at the root level of your account and so it volition piece of work. Once yous make the Sites folder you will notice that it has a unique icon which is a throwback from a few versions older. Make that folder before yous ready upwardly the user configuration file described adjacent.

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

Big sur Sites User Folder

Add a "username.conf" filed under:

/etc/apache2/users/

If you don't already take ane (very likely), then create ane named by the short username of the business relationship with the suffix .conf, its location and permissions/ownership is best tackled by using the Final, the text editor 'nano' would be the best tool to deal with this.

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

Bbedit Macos Bigsur Editing

Launch Terminal, (Applications/Utilities), and follow the commands below, commencement one gets yous to the right spot, 2nd one opens the text editor on the command line (swap 'username' with your account's shortname, if you don't know your account shortname type 'whoami' the Final prompt):

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

Then add the content beneath swapping in your 'username' in the code below, at that place is a slightly dissimilar user directive for Big Sur and Catalina, make certain '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--   i root  wheel  298 Jun 28 xvi:47 username.conf

If not, you need to modify information technology...

sudo chmod 644 username.conf

Open up the main httpd.conf and permit 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.then
LoadModule include_module libexec/apache2/mod_include.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.and then

While you have this file open also to get php running, uncomment the beneath ... (Mentioned also in the PHP role 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/actress/httpd-userdir.conf

Salvage all your changes (Control + O in nano)

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

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

And uncomment:

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

Relieve all your changes (Control + O in nano)

Restart Apache for the new file to be read:

sudo apachectl restart

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

http://localhost/~username/

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

Macos User Web Root

Override .htaccess and let URL Rewrites

If y'all are going to use the web serving document root at /Library/WebServer/Documents it is a proficient idea to allow any .htaccess files used to override the default settings - this can be accomplished by 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 past following the previous stride.

sudo nano /etc/apache2/httpd.conf        

Osx Htaccess Override

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

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

LoadModule rewrite_module libexec/apache2/mod_rewrite.then

PHP

PHP 7.three.24 is loaded in this version of macOS Large 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 within 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 lesser 'control o' and 'control ten'

Reload Apache to kick in

sudo apachectl restart

To run into and exam PHP, create a file proper noun it "phpinfo.php" and file it in your document root with the contents below, then view information technology in a browser.

          <?php phpinfo(); ?>

Macos Php Legacy

Here you lot will run across that Apple tree are not intending on bundling PHP in the macOS in the future, perhaps with the side by side incarnation of the Bone, but for now information technology's working albeit not version 7.4. Even so you can use a Homebrew PHP solution that allows for whatever PHP version to exist used.

          [e-mail protected]          Documents % php -five WARNING: PHP is not recommended PHP is included in macOS for compatibility with legacy software. Future versions of macOS volition not include PHP. PHP 7.iii.24-(to be removed in future macOS) (cli) (built: Dec 21 2020 21:33:25) ( NTS ) Copyright (c) 1997-2018 The PHP Grouping Zend Engine v3.three.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.

Employ the macOS ten.15 (x86, 64-bit), DMG Archive version (works on macOS Big Sur).

Macos Mysql Download

If you lot are upgrading from a previous macOS and accept an older MySQL version you lot do not take to update it.

Also if y'all take a clean install and want the before MySQL version 5.7, yous can withal go this from the MySQL site - from the 'Looking for previous GA versions' link. (MySQL 8 is relatively new and not in many production set ups)

Mysql Product Archives

One matter with MySQL upgrades, e'er take a data dump of your database in case things go southward and before you upgrade to macOS Catalina make sure your MySQL Server is not running.

When downloading you don't accept to sign upwardly, look for » No cheers, only showtime mydownload - become direct to the download.

One time downloaded open the .dmg and run the installer.

During the MySQL process you are prompted to choose betwixt strong and legacy password encryptions, since version 8 is entirely new, some software like phpMyAdmin can't connect with the newer encryptions - and then if you are going to employ a GUI wrapper like phpMyadmin I suggest y'all stick to legacy.

Macos Bigsur Mysql Legacy Password

And so add together a password for the MySQL root user.

Macos Bigsur Mysql Root Password

Add Mysql to your path

After 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 footstep) this is done in your Zsh shell profile ".zshrc" file in your home directory (previous shells were fustigate ), if you lot don't have that file simply create it using vi or nano:

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

The first command brings you 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. Get out the file with type "command + ten" and when prompted to salve the change by typing "y". The last thing to do hither is to reload the trounce for the in a higher place to work directly away.

source ~/.zshrc

Modify the MySQL root password

(This department is left in for reference - in previous macOS MySQL packages the password fix during the installation procedure would fail - hence the info below. This newer version, however, seems to work).

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

Stop MySQL

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

Start it in rubber mode:

sudo mysqld_safe --skip-grant-tables

This will be an ongoing command until the procedure is finished and then open another beat/concluding window, and log in without a countersign as root:

mysql -u root
Affluent PRIVILEGES;
Modify USER 'root'@'localhost' IDENTIFIED Past 'MyNewPass';

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

\q

Start MySQL

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

Starting MySQL

Macos Mysql Start Stop

Yous can then start the MySQL server from the Arrangement Preferences adds to the last row or via the command line.

Macos Mysql Sys Pref

The new MySQL organization preference as well 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 1. Y'all tin can also see the paths to the config and information sources of MySQL in the configuration tab.

Or to Control line showtime MySQL.

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

To detect the MySQL version from the concluding, 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.

Fix the 2002 MySQL Socket fault

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 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

First fix the 2002 socket error if you haven'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 zippo English package will accommodate a lot of users, so unzip information technology and move the binder with its contents into the document root level renaming binder to 'phpmyadmin'.

Make the config folder

mkdir ~/Sites/phpmyadmin/config

Change the permissions

chmod o+w ~/Sites/phpmyadmin/config

Run the set up in the browser

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

Y'all demand 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 password that you set before for the MySQL root user fix, click on save 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 allow you to interact with your MySQL databases.

Macos Phpmyadmin

Permissions

To run a website with no permission bug it is best to gear up the web root and its contents to be writeable by all since it's a local development it shouldn't exist a security issue.

Let's say that you have a site in the User Sites binder at the following location ~/Sites/testsite you would set it to be writeable like so:

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

If yous are concerned about security then instead of making information technology world writeable you tin can set the owner to be Apache _www just when working on files you would have to authenticate more as admin you are "not" the owner, you would do this like and then:

sudo chown -R _www ~/Sites/testsite

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

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

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

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

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

To fix vritual hosts aka vhosts on Apache bank check the guide hither.

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

Download Mysql for Mac Os X 10.6

Posted by: gonzaleztagathe.blogspot.com

Post a Comment

Previous Post Next Post

Iklan Banner setelah judul