Download Mysql for Mac Os X 10.6.8 Updated

Download Mysql for Mac Os X 10.6.8

Go your Local Web Development Surround Upwardly & Running on macOS Large Sur 11 and Catalina 10.15

Macos Install Big Sur

With Apples' new macOS Big Sur 11 bachelor 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 Bone Big Sur.

This guide will also work on macOS Catalina and Mojave.

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

Apache/WebSharing

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

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

For those not familiar with the Final, information technology really isn't as intimidating every bit you may think, in one case launched you are faced with a control prompt waiting for your commands - just blazon/paste in a command and hit enter, some commands give you no response - information technology just ways 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 confirm with your admin countersign or iCloud password if set that style.... allow's get to it ...

to commencement Apache web sharing

sudo apachectl start

to finish it

sudo apachectl cease

to restart information technology

sudo apachectl restart

To find the Apache version

httpd -5

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

Bigsur Macos It Works Webroot

After 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 exam, you can try troubleshooting Apache to run into if there is anything incorrect in its config file by running

apachectl configtest

This volition requite yous 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 like to the traditional names of 'public_html' and 'htdocs', macOS has historically had 2 web roots one at a organization level and one at a user level - you can gear up both up or merely run with one, the user level one allows multiple accounts to have their ain web root whilst the system 1 is global for all users. Information technology seems there is less endeavor from Apple tree in continuing with the user level one simply it still tin can exist gear up with a couple of extra tweaks in configuration files. Information technology is easier to utilise the user level ane every bit y'all don't take to keep on authenticating equally an admin user.

System Level Web Root

- the default organisation certificate root is still establish 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 past default is the '~/Sites' folder in the User business relationship. This takes a bit longer to ready merely some users are very accustomed to using it.

You need to make a "Sites" folder at the root level of your business relationship and then it volition work. Once you make the Sites folder you will notice that it has a unique icon which is a throwback from a few versions older. Brand that folder before you ready the user configuration file described next.

Yous have to make a few additional tweaks to become the ~/Sites folder support and running.

Big sur Sites User Folder

Add a "username.conf" filed under:

/etc/apache2/users/

If you don't already have ane (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 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 every bit an app I would suggest text editor similar the complimentary BBEdit which allows you to open subconscious system files.

Bbedit Macos Bigsur Editing

Launch Last, (Applications/Utilities), and follow the commands below, first one gets y'all to the right spot, 2nd one opens the text editor on the control line (swap 'username' with your account's shortname, if you lot don't know your business relationship shortname type 'whoami' the Terminal 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 dissimilar user directive for Large 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  wheel  298 Jun 28 16:47 username.conf

If not, you need to change it...

sudo chmod 644 username.conf

Open the chief httpd.conf and allow some modules:

sudo nano /etc/apache2/httpd.conf

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

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

While you have this file open too to get php running, uncomment the below ... (Mentioned also in the PHP office 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 (Command + O in nano)

Then 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 be read:

sudo apachectl restart

Then this user level certificate root will be viewable at:

http://localhost/~username/

You should only see a directory tree like structure if the folder is empty.

Macos User Web Root

Override .htaccess and allow URL Rewrites

If you are going to use the spider 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 can be accomplished by editing the httpd.conf file at line 217 and setting the AllowOverride to All and and so 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 allow URL rewrites then your permalinks expect clean, not ugly.

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

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

PHP

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

sudo nano /etc/apache2/httpd.conf

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

LoadModule php7_module libexec/apache2/libphp7.and then

Write out and Relieve using the nano shortcut keys at the lesser 'command o' and 'control x'

Reload Apache to kick in

sudo apachectl restart

To meet and examination PHP, create a file name it "phpinfo.php" and file it in your certificate root with the contents beneath, then view it in a browser.

          <?php phpinfo(); ?>

Macos Php Legacy

Hither you will see that Apple are not intending on bundling PHP in the macOS in the future, perhaps with the next incarnation of the OS, just for at present it'southward working albeit not version 7.4. Yet you can use a Homebrew PHP solution that allows for any PHP version to be used.

          [email protected]          Documents % php -v Alert: PHP is not recommended PHP is included in macOS for compatibility with legacy software. Future versions of macOS volition not include PHP. PHP 7.3.24-(to be removed in future macOS) (cli) (built: December 21 2020 21:33:25) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.iii.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 work with the latest release of macOS.

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

Macos Mysql Download

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

Also if y'all accept a make clean install and want the before MySQL version 5.seven, you can still get this from the MySQL site - from the 'Looking for previous GA versions' link. (MySQL viii is relatively new and not in many product set ups)

Mysql Product Archives

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

When downloading yous don't have to sign up, await for » No cheers, just commencement mydownload - go straight 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 8 is entirely new, some software like phpMyAdmin tin't connect with the newer encryptions - so if you lot are going to use a GUI wrapper like phpMyadmin I suggest yous stick to legacy.

Macos Bigsur Mysql Legacy Password

Then add a countersign 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 demand to add together the mysql directory to your shell path, (optional step) this is washed in your Zsh trounce profile ".zshrc" file in your abode directory (previous shells were fustigate ), if you lot don't have that file just 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 i if it doesn't be, then add together in the line above which adds the MySQL binary path to commands that you tin can run. Exit the file with blazon "command + x" and when prompted to save the modify past typing "y". The last thing to do here is to reload the shell for the above to work directly abroad.

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 piece of work).

Annotation that this is not the aforementioned every bit 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 stop

Start it in safety mode:

sudo mysqld_safe --skip-grant-tables

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

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

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

\q

Start MySQL

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

Starting MySQL

Macos Mysql Start Stop

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

Macos Mysql Sys Pref

The new MySQL arrangement preference also has the uninstall characteristic - useful if you've installed it with a security encryption that'due south not working for you and want to endeavour the other one. You can as well 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 start

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

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

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

Set the 2002 MySQL Socket error

Set up the looming 2002 socket fault - which is linking where MySQL places the socket and where macOS thinks it should be, MySQL puts information technology in /tmp and macOS looks for it 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 mistake if you haven't done so from the MySQL section-

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

Macos Phpmyadmin Download

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

Brand the config binder

mkdir ~/Sites/phpmyadmin/config

Change the permissions

chmod o+west ~/Sites/phpmyadmin/config

Run the set up 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 Hallmark tab and ready the local MySQL root user and the countersign.
Add in the username "root" (maybe already populated, add in the password that you set up earlier for the MySQL root user prepare, click on save and you lot 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/ will now allow y'all to interact with your MySQL databases.

Macos Phpmyadmin

Permissions

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

Let's say that you accept a site in the User Sites folder 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 it globe writeable you tin can set the owner to be Apache _www but when working on files you would have to cosign more than as admin you are "not" the owner, you would practice this like so:

sudo chown -R _www ~/Sites/testsite

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

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

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

Some other more straightforward fashion to do this if y'all have a i user workstation is to change the Apache web user from _www to your account.

That'southward it! You now accept the native AMP stack running on top of macOS Large Sur or Catalina.

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

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

Download Mysql for Mac Os X 10.6.8

Posted by: pruittquicany.blogspot.com

0 Komentar

Post a Comment




banner