Mysql Download Mac Os X 10.10
Get your Local Web Development Environment Up & Running on macOS Big Sur 11 and Catalina 10.fifteen
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 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 mode using the loaded Apache and PHP and downloading MySQL and phpMyAdmin.
Apache/WebSharing
Web serving is congenital into Big Sur with Apache app, it is installed ready to be fired upward.
This needs to be done in the Terminal which is found in the OS filing system at /Applications/Utilities/Terminal
For those not familiar with the Final, it really isn't as intimidating as you may think, once launched y'all are faced with a command prompt waiting for your commands - but type/paste in a command and hit enter, some commands give you lot no response - it but ways the command is washed, other commands requite y'all feedback.
Using the prefix of sudo is required for commands that have their applications protected in specific folders - when using sudo y'all will need to confirm with your admin password or iCloud countersign if ready that way.... let'south get to information technology ...
to showtime Apache web sharing
sudo apachectl start
to stop it
sudo apachectl stop
to restart it
sudo apachectl restart
To discover the Apache version
httpd -5
The Apache version that comes in macOS Large Sur is Apache/2.iv.46
Afterwards starting Apache - test to see if the webserver is working in the browser - http://localhost - you should encounter the "Information technology Works!" text.
If you don't get the localhost test, y'all tin can try troubleshooting Apache to run across if in that location is anything wrong in its config file by running
apachectl configtest
This will requite you lot 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 system level and ane at a user level - you lot tin set both up or just run with one, the user level i allows multiple accounts to have their own web root whilst the system ane is global for all users. It seems at that place is less effort from Apple tree in continuing with the user level one only information technology even so tin can be set up with a couple of extra tweaks in configuration files. It is easier to employ the user level i equally you don't take to keep on authenticating as an admin user.
System Level Web Root
- the default arrangement document root is nonetheless found at -
http://localhost/
The files are shared in the filing system at -
/Library/WebServer/Documents/
User Level Root
The other spider web root directory which is missing by default is the '~/Sites' folder in the User account. This takes a chip longer to set up but some users are very accustomed to using it.
You lot need to make a "Sites" folder at the root level of your business relationship and then it will piece of work. Once you lot 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 y'all set up up the user configuration file described next.
You have to make a few additional tweaks to get the ~/Sites folder back up and running.
Add together a "username.conf" filed under:
/etc/apache2/users/
If you don't already have one (very probable), so create one named by the curt username of the account with the suffix .conf, its location and permissions/ownership is best tackled past using the Terminal, the text editor 'nano' would be the best tool to deal with this.
If y'all would rather edit config files in a text editor every bit an app I would suggest text editor like the gratis BBEdit which allows you to open up hidden system files.
Launch Terminal, (Applications/Utilities), and follow the commands below, starting time one gets you to the right spot, 2nd i opens the text editor on the command line (bandy 'username' with your account'south shortname, if you don't know your account shortname type 'whoami' the Terminal prompt):
cd /etc/apache2/users
sudo nano username.conf
So add the content beneath swapping in your 'username' in the lawmaking below, at that place is a slightly different user directive for Big Sur and Catalina, brand sure 'Require host localhost' is used:
<Directory "/Users/username/Sites/"> AllowOverride All Options Indexes MultiViews FollowSymLinks Crave 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 ii 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.then
LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule include_module libexec/apache2/mod_include.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.and so
While you have this file open also to get php running, uncomment the below ... (Mentioned also in the PHP part of the commodity).
LoadModule php7_module libexec/apache2/libphp7.so
And also uncomment this configuration file also in httpd.conf - which allows user habitation directories.
Include /private/etc/apache2/extra/httpd-userdir.conf
Save all your changes (Control + O in nano)
Then open some other Apache config file and uncomment some other file:
sudo nano /etc/apache2/extra/httpd-userdir.conf
And uncomment:
Include /private/etc/apache2/users/*.conf
Salve all your changes (Command + O in nano)
Restart Apache for the new file to be read:
sudo apachectl restart
So this user level document root will be viewable at:
http://localhost/~username/
You should just see a directory tree similar construction if the binder is empty.
Override .htaccess and permit URL Rewrites
If you are going to use the web serving document root at /Library/WebServer/Documents it is a expert 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 then restart Apache. This is already taken care of at the Sites level webroot past following the previous step.
sudo nano /etc/apache2/httpd.conf
Also while here allow URL rewrites so your permalinks look clean, non ugly.
Uncomment in httpd.conf - should be uncommented on a clean instalfifty.
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
PHP
PHP 7.iii.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" + "w" to search inside 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.so
Write out and Save using the nano shortcut keys at the bottom 'control o' and 'control ten'
Reload Apache to kicking 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 beneath, then view information technology in a browser.
<?php phpinfo(); ?>
Here you will see that Apple tree are not intending on bundling PHP in the macOS in the time to come, perhaps with the next incarnation of the OS, but for now it'southward working admitting not version 7.iv. However you tin utilise a Homebrew PHP solution that allows for any PHP version to be used.
[email protected] Documents % php -v Warning: PHP is non recommended PHP is included in macOS for compatibility with legacy software. Future versions of macOS volition not include PHP. PHP seven.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.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 piece of work with the latest release of macOS.
Use the macOS ten.15 (x86, 64-bit), DMG Archive version (works on macOS Big Sur).
If y'all are upgrading from a previous macOS and accept an older MySQL version you do not have to update it.
Also if you have a clean install and want the earlier MySQL version 5.7, you tin can nevertheless get 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)
Ane matter with MySQL upgrades, always take a information dump of your database in case things go south and before you upgrade to macOS Catalina make sure your MySQL Server is not running.
When downloading y'all don't have to sign upwardly, expect for » No thank you, just start mydownload - go direct to the download.
One time downloaded open the .dmg and run the installer.
During the MySQL process you lot are prompted to choose between strong and legacy countersign encryptions, since version 8 is entirely new, some software like phpMyAdmin can't connect with the newer encryptions - and so if you are going to employ a GUI wrapper like phpMyadmin I suggest you stick to legacy.
Then add a password for the MySQL root user.
Add together Mysql to your path
After installation, in order to apply MySQL commands without typing the full path to the commands you demand 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 don't accept that file just create it using 6 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 1 if information technology doesn't exist, then add in the line above which adds the MySQL binary path to commands that you can run. Get out the file with type "control + x" and when prompted to salvage the modify by typing "y". The concluding thing to do here is to reload the crush for the to a higher place to work straight away.
source ~/.zshrc
Modify 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 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/support-files/mysql.server stop
First it in safe fashion:
sudo mysqld_safe --skip-grant-tables
This will be an ongoing command until the procedure is finished so open another shell/final window, and log in without a password equally root:
mysql -u root
FLUSH PRIVILEGES;
Change USER 'root'@'localhost' IDENTIFIED Past 'MyNewPass';
Modify the lowercase 'MyNewPass' to what you want - and keep the unmarried quotes.
\q
Start MySQL
sudo /usr/local/mysql/support-files/mysql.server get-go
Starting MySQL
Yous tin then start the MySQL server from the System Preferences adds to the last row or via the control line.
The new MySQL organisation preference likewise has the uninstall characteristic - useful if you've installed it with a security encryption that's not working for yous and want to endeavour the other one. Y'all tin can also see the paths to the config and information sources of MySQL in the configuration tab.
Or to Control line start MySQL.
sudo /usr/local/mysql/support-files/mysql.server start
To find the MySQL version from the terminal, blazon 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 exit.
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 communication.
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
phpMyAdmin
First gear up the 2002 socket mistake if you haven't done and then from the MySQL section-
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Download phpMyAdmin, the zip English language bundle will suit a lot of users, then unzip it and move the folder with its contents into the certificate root level renaming binder to 'phpmyadmin'.
Make the config folder
mkdir ~/Sites/phpmyadmin/config
Change the permissions
chmod o+west ~/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 set the local MySQL root user and the countersign.
Add in the username "root" (perchance already populated, add in the password that you set upwards before for the MySQL root user set upwards, click on save and yous are returned to the previous screen.
(This is not the macOS Admin or root countersign - information technology is the MySQL root user)
Now going to http://localhost/~username/phpmyadmin/ will now allow y'all to interact with your MySQL databases.
Permissions
To run a website with no permission bug information technology is best to gear up the web root and its contents to be writeable by all since information technology's a local development it shouldn't exist a security issue.
Let'southward say that y'all take a site in the User Sites binder at the post-obit location ~/Sites/testsite yous would set it to exist writeable like so:
sudo chmod -R a+w ~/Sites/testsite
If you are concerned nearly security then instead of making information technology world writeable you can set the owner to be Apache _www just when working on files you lot would take to authenticate more as admin yous are "not" the possessor, y'all would do this like and then:
sudo chown -R _www ~/Sites/testsite
This volition set up the contents recursively to be owned by the Apache user.
If you had the website stored at the Organisation 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 way to do this if yous accept a one user workstation is to change the Apache web user from _www to your business relationship.
That's it! Y'all now accept the native AMP stack running on top 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 smooth lean local development surroundings - also worth checking out is Laravel Valet which runs on height of macOS - check out my Valet WordPress Guide on macOS.
Mysql Download Mac Os X 10.10
Posted by: stephensdisawn.blogspot.com