Mysql for Mac Os X 10.6 Download Updated

Mysql for Mac Os X 10.6 Download

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

Macos Install Big Sur

With Apples' new macOS Big Sur eleven available for download, here is how to go the AMP stack up and running on the new macOS. This tutorial will go through the procedure of getting Apache, MySQL, PHP (or otherwise known as 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 upwardly the AMP stack in more of a traditional manner using the loaded Apache and PHP and downloading MySQL and phpMyAdmin.

Apache/WebSharing

Spider web serving is built into Large Sur with Apache app, information technology is installed ready to be fired up.

This needs to be washed in the Concluding which is establish in the Os filing organisation at /Applications/Utilities/Last

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

Using the prefix of sudo is required for commands that have their applications protected in specific folders - when using sudo you lot volition need to ostend with your admin password or iCloud password if prepare up that mode.... allow'due south get to information technology ...

to start Apache web sharing

sudo apachectl get-go

to cease it

sudo apachectl end

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.four.46

Bigsur Macos It Works Webroot

Afterward starting Apache - exam to see if the webserver is working in the browser - http://localhost - you should run into the "It Works!" text.

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

apachectl configtest

This will give y'all an indication of what might be wrong.

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 2 spider web roots i at a system level and one at a user level - yous can ready both up or just run with one, the user level 1 allows multiple accounts to have their ain web root whilst the arrangement one is global for all users. It seems there is less endeavor from Apple in standing with the user level one merely it even so tin can be set upwards with a couple of extra tweaks in configuration files. It is easier to use the user level i as you don't have to keep on authenticating every bit an admin user.

System Level Web Root

- the default organisation document root is still plant 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' folder in the User account. This takes a bit longer to gear up up simply some users are very accustomed to using information technology.

You lot demand to brand a "Sites" folder at the root level of your account and then it will work. Once you make the Sites folder y'all will notice that it has a unique icon which is a throwback from a few versions older. Brand that folder before you lot set upward the user configuration file described next.

You lot have to make a few boosted tweaks to become the ~/Sites folder back up and running.

Big sur Sites User Folder

Add together a "username.conf" filed nether:

/etc/apache2/users/

If you lot don't already accept ane (very likely), then create ane named by the short username of the account with the suffix .conf, its location and permissions/ownership is best tackled by using the Concluding, the text editor 'nano' would be the all-time tool to bargain with this.

If yous would rather edit config files in a text editor as an app I would propose 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 below, first one gets you to the correct spot, 2nd ane opens the text editor on the command line (swap 'username' with your account'due south 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 below swapping in your 'username' in the code below, there 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--   ane root  bicycle  298 Jun 28 16:47 username.conf

If not, y'all need 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 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.and so
LoadModule include_module libexec/apache2/mod_include.and so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so

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

LoadModule php7_module libexec/apache2/libphp7.then

And too uncomment this configuration file also in httpd.conf - which allows user dwelling house directories.

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

Salve all your changes (Control + O in nano)

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

Y'all should but see a directory tree like construction if the folder is empty.

Macos User Web Root

Override .htaccess and let URL Rewrites

If yous are going to employ the web serving document root at /Library/WebServer/Documents it is a good idea to let whatsoever .htaccess files used to override the default settings - this tin can exist accomplished past editing the httpd.conf file at line 217 and setting the AllowOverride to All and so restart Apache. This is already taken intendance of at the Sites level webroot past following the previous step.

sudo nano /etc/apache2/httpd.conf        

Osx Htaccess Override

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

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

LoadModule rewrite_module libexec/apache2/mod_rewrite.then

PHP

PHP seven.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 will land y'all 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 meet and test PHP, create a file name information technology "phpinfo.php" and file it in your certificate root with the contents beneath, then view it in a browser.

          <?php phpinfo(); ?>

Macos Php Legacy

Here you will see that Apple are not intending on bundling PHP in the macOS in the hereafter, peradventure with the next incarnation of the OS, but for now it'south working albeit not version 7.four. Notwithstanding you can utilize a Homebrew PHP solution that allows for whatsoever PHP version to exist 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 non include PHP. PHP vii.3.24-(to be removed in future macOS) (cli) (congenital: December 21 2020 21:33:25) ( NTS ) Copyright (c) 1997-2018 The PHP Grouping 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 viii.0.23 does piece of work with the latest release of macOS.

Employ the macOS 10.15 (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 you practice not have to update information technology.

Likewise if you take a clean install and desire the earlier MySQL version 5.7, you can still get this from the MySQL site - from the 'Looking for previous GA versions' link. (MySQL 8 is relatively new and not in many production ready ups)

Mysql Product Archives

One thing with MySQL upgrades, ever take a information dump of your database in case things go south and before you upgrade to macOS Catalina brand sure your MySQL Server is not running.

When downloading you don't have to sign up, look for » No cheers, just start mydownload - get direct to the download.

Once downloaded open the .dmg and run the installer.

During the MySQL process you are prompted to choose between strong and legacy password encryptions, since version viii is entirely new, some software like phpMyAdmin tin't connect with the newer encryptions - so if y'all are going to utilise a GUI wrapper similar phpMyadmin I propose yous 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

After installation, in order to use MySQL commands without typing the full path to the commands y'all need to add the mysql directory to your shell path, (optional pace) this is washed in your Zsh shell profile ".zshrc" file in your home directory (previous shells were bash ), if you lot don't have that file only create it using vi or nano:

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

The get-go command brings you to your home directory and opens the .zsh file or creates a new one if it doesn't be, so add in the line above which adds the MySQL binary path to commands that yous tin can run. Exit the file with type "command + x" and when prompted to save the change by typing "y". The last affair to practice here is to reload the shell for the in a higher place to work direct away.

source ~/.zshrc

Modify the MySQL root password

(This department is left in for reference - in previous macOS MySQL packages the countersign ready during the installation process would fail - hence the info below. This newer version, however, seems to piece of work).

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

Stop MySQL

sudo /usr/local/mysql/back up-files/mysql.server terminate

Start it in safe mode:

sudo mysqld_safe --skip-grant-tables

This volition 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
Flush PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED By 'MyNewPass';

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

\q

First MySQL

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

Starting MySQL

Macos Mysql Start Stop

You tin then start the MySQL server from the Organisation Preferences adds to the last row or via the control line.

Macos Mysql Sys Pref

The new MySQL system preference likewise has the uninstall feature - useful if you've installed it with a security encryption that'southward not working for you lot and desire to try the other one. You tin 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/back up-files/mysql.server starting time

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

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

This as well puts you into a shell interactive dialogue with MySQL, blazon \q to get out.

Fix 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 it in /var/mysql the socket is a type of file that allows MySQL client/server advice.

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

phpMyAdmin

First fix the 2002 socket mistake if y'all 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 cipher English package will suit a lot of users, then unzip information technology and motility the folder with its contents into the document root level renaming folder to 'phpmyadmin'.

Brand the config binder

mkdir ~/Sites/phpmyadmin/config

Modify 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 need to create a new localhost mysql server connection, click new server.


Switch to the Authentication tab and ready the local MySQL root user and the countersign.
Add together in the username "root" (maybe already populated, add in the countersign that yous ready 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 - it is the MySQL root user)

Now going to http://localhost/~username/phpmyadmin/ will at present allow you to interact with your MySQL databases.

Macos Phpmyadmin

Permissions

To run a website with no permission issues it is all-time to set the web root and its contents to be writeable by all since it'south a local evolution it shouldn't be a security consequence.

Let's say that yous have a site in the User Sites folder at the post-obit location ~/Sites/testsite you lot would set it to exist writeable like then:

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

If yous are concerned nigh security and so instead of making it earth writeable you can set up the owner to be Apache _www simply when working on files you lot would take to authenticate more equally admin you are "not" the owner, you would do this like so:

sudo chown -R _www ~/Sites/testsite

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

If y'all had the website stored at the System 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 fashion to practice this if yous take a one user workstation is to modify the Apache web user from _www to your account.

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

To gear up vritual hosts aka vhosts on Apache check 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 summit of macOS - check out my Valet WordPress Guide on macOS.

Mysql for Mac Os X 10.6 Download

Posted by: austriatholoted.blogspot.com

Publicar un comentario

0 Comentarios