Mysql Mac Os X 10.7 Download Updated
Mysql Mac Os X 10.7 Download
Get your Local Web Development Surround Up & Running on macOS Big Sur 11 and Catalina 10.15
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 volition 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 piece of work on macOS Catalina and Mojave.
This tutorial sets upwards the AMP stack in more of a traditional manner 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 ready to exist fired up.
This needs to be done in the Concluding which is establish in the OS filing system at /Applications/Utilities/Concluding
For those not familiar with the Terminal, information technology actually isn't as intimidating as you may think, once launched you are faced with a control 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 done, other commands give yous feedback.
Using the prefix of sudo is required for commands that accept their applications protected in specific folders - when using sudo y'all will need to ostend with your admin password or iCloud countersign if fix that fashion.... let'south get to it ...
to kickoff Apache web sharing
sudo apachectl starting time
to stop information technology
sudo apachectl stop
to restart it
sudo apachectl restart
To discover the Apache version
httpd -v
The Apache version that comes in macOS Big Sur is Apache/2.4.46
After starting Apache - examination to encounter if the webserver is working in the browser - http://localhost - you should meet the "It Works!" text.
If y'all don't get the localhost exam, yous can endeavor troubleshooting Apache to see if there 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 system and is similar to the traditional names of 'public_html' and 'htdocs', macOS has historically had 2 web roots one at a arrangement level and 1 at a user level - y'all can set both upwards or simply 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. It seems in that location is less effort from Apple in continuing with the user level i but information technology still can exist prepare with a couple of actress tweaks in configuration files. It is easier to apply the user level one as y'all don't have to proceed on authenticating as an admin user.
System Level Web Root
- the default system certificate root is still constitute at -
http://localhost/
The files are shared in the filing arrangement 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 flake longer to set up but some users are very accustomed to using information technology.
Yous need to make a "Sites" folder at the root level of your account then it volition work. Once you make the Sites folder you will detect that information technology has a unique icon which is a throwback from a few versions older. Make that binder before y'all prepare the user configuration file described adjacent.
Yous have to make a few additional tweaks to become the ~/Sites folder back up and running.
Add together a "username.conf" filed nether:
/etc/apache2/users/
If you lot don't already have one (very likely), and so create ane named by the short 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 exist the best tool to deal with this.
If you would rather edit config files in a text editor equally an app I would propose text editor similar the complimentary BBEdit which allows you lot to open subconscious system files.
Launch Concluding, (Applications/Utilities), and follow the commands below, offset 1 gets you to the right spot, second one opens the text editor on the control line (bandy 'username' with your account'south shortname, if yous don't know your business relationship shortname blazon 'whoami' the Last prompt):
cd /etc/apache2/users
sudo nano username.conf
So add the content below swapping in your 'username' in the code beneath, 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 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 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.then
LoadModule include_module libexec/apache2/mod_include.then
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
While you have this file open up likewise to become php running, uncomment the below ... (Mentioned also in the PHP part of the article).
LoadModule php7_module libexec/apache2/libphp7.then
And also uncomment this configuration file besides in httpd.conf - which allows user dwelling house directories.
Include /private/etc/apache2/extra/httpd-userdir.conf
Save all your changes (Control + O in nano)
And 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
Then this user level certificate root volition exist viewable at:
http://localhost/~username/
You should only run across a directory tree like structure if the binder is empty.
Override .htaccess and permit URL Rewrites
If you are going to utilise the web serving document root at /Library/WebServer/Documents it is a skilful idea to permit any .htaccess files used to override the default settings - this can be achieved 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 by following the previous stride.
sudo nano /etc/apache2/httpd.conf
Also 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.so
PHP
PHP 7.3.24 is loaded in this version of macOS Big Sur and needs to be turned on by uncommenting a line in the httpd.conf file.
sudo nano /etc/apache2/httpd.conf
Use "command" + "w" to search inside nano and search for 'php' this will state you on the right line then uncomment the line (remove the #):
LoadModule php7_module libexec/apache2/libphp7.and then
Write out and Salve using the nano shortcut keys at the lesser 'control o' and 'control x'
Reload Apache to boot in
sudo apachectl restart
To see and exam PHP, create a file name it "phpinfo.php" and file it in your document root with the contents beneath, then view it in a browser.
<?php phpinfo(); ?>
Hither you volition run across that Apple are not intending on bundling PHP in the macOS in the time to come, perhaps with the next incarnation of the OS, but for at present it's working albeit non version 7.4. Nonetheless you tin utilise a Homebrew PHP solution that allows for whatever 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. Hereafter versions of macOS volition not include PHP. PHP 7.3.24-(to exist removed in future macOS) (cli) (built: Dec 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 exist dowloaded from the MySQL site.
The latest version of MySQL 8.0.23 does piece of work with the latest release of macOS.
Utilize the macOS ten.15 (x86, 64-bit), DMG Archive version (works on macOS Big Sur).
If you are upgrading from a previous macOS and take an older MySQL version you do not take to update it.
Also if you take a clean install and desire the before MySQL version 5.7, you lot tin 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 set ups)
One thing with MySQL upgrades, always take a data dump of your database in case things go due south and earlier you upgrade to macOS Catalina brand certain your MySQL Server is not running.
When downloading you don't have to sign upward, expect for » No thanks, just start mydownload - go direct to the download.
Once downloaded open the .dmg and run the installer.
During the MySQL procedure you are prompted to choose between strong and legacy password encryptions, since version 8 is entirely new, some software similar phpMyAdmin can't connect with the newer encryptions - and then if you are going to employ a GUI wrapper like phpMyadmin I suggest you lot stick to legacy.
So add a password for the MySQL root user.
Add Mysql to your path
Later on installation, in society to use MySQL commands without typing the full path to the commands yous need to add the mysql directory to your shell path, (optional step) this is done in your Zsh shell profile ".zshrc" file in your home directory (previous shells were fustigate ), if you don't have that file but create it using vi or nano:
cd ; nano .zshrc
export PATH="/usr/local/mysql/bin:$PATH"
The outset command brings you lot to your home directory and opens the .zsh file or creates a new one if it doesn't exist, then add in the line above which adds the MySQL binary path to commands that you can run. Exit the file with type "control + x" and when prompted to salve the change past typing "y". The concluding thing to do here is to reload the shell for the above to work straight away.
source ~/.zshrc
Modify the MySQL root countersign
(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 work).
Annotation that this is non 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
Kickoff information technology in safe fashion:
sudo mysqld_safe --skip-grant-tables
This will be an ongoing command until the process is finished so open another crush/terminal window, and log in without a password as root:
mysql -u root
FLUSH PRIVILEGES;
Modify USER 'root'@'localhost' IDENTIFIED By 'MyNewPass';
Change the lowercase 'MyNewPass' to what you lot desire - and go along the unmarried quotes.
\q
Showtime MySQL
sudo /usr/local/mysql/support-files/mysql.server showtime
Starting MySQL
You can so starting time the MySQL server from the System Preferences adds to the concluding row or via the command line.
The new MySQL system preference also has the uninstall feature - useful if you lot've installed it with a security encryption that's not working for you and want to attempt the other ane. You can likewise meet 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 find the MySQL version from the terminal, 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 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 blazon of file that allows MySQL client/server communication.
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
phpMyAdmin
Offset fix the 2002 socket error if you lot haven't done so from the MySQL section-
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Download phpMyAdmin, the zip English packet will adjust a lot of users, then unzip information technology and move the folder with its contents into the certificate root level renaming folder to 'phpmyadmin'.
Brand the config folder
mkdir ~/Sites/phpmyadmin/config
Change the permissions
chmod o+w ~/Sites/phpmyadmin/config
Run the fix up in the browser
http://localhost/~username/phpmyadmin/setup/ or http://localhost/phpmyadmin/setup/
You 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 in the password that yous ready 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 - information technology is the MySQL root user)
Now going to http://localhost/~username/phpmyadmin/ will now let you to interact with your MySQL databases.
Permissions
To run a website with no permission issues information technology is all-time to fix the web root and its contents to be writeable past all since it's a local development information technology shouldn't exist a security outcome.
Let'southward say that you have a site in the User Sites folder at the post-obit location ~/Sites/testsite yous would ready it to be writeable like so:
sudo chmod -R a+w ~/Sites/testsite
If you lot are concerned about security then instead of making it globe writeable yous tin set the possessor to be Apache _www but when working on files you would have to authenticate more every bit admin you lot are "non" the owner, y'all would practice this like so:
sudo chown -R _www ~/Sites/testsite
This will set the contents recursively to exist 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 have to exist the latter:
sudo chown -R _www /Library/WebServer/Documents/testsite
Another more straightforward mode to do this if you have a one user workstation is to change the Apache web user from _www to your account.
That's information technology! You at present have the native AMP stack running on pinnacle of macOS Large Sur or Catalina.
To set up vritual hosts aka vhosts on Apache check the guide here.
If you are a WordPress user and want a smoothen lean local development environment - also worth checking out is Laravel Valet which runs on acme of macOS - check out my Valet WordPress Guide on macOS.
Mysql Mac Os X 10.7 Download
Posted by: cookbrisarme.blogspot.com
Post a Comment for "Mysql Mac Os X 10.7 Download Updated"