Download Phpmyadmin for Mac Os X Lion Updated

Download Phpmyadmin for Mac Os X Lion

Get your Local Web Evolution Environs 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 get the AMP stack up and running on the new macOS. This tutorial will get 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 too piece of work on macOS Catalina and Mojave.

This tutorial sets upward the AMP stack in more of a traditional way 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 fix to be fired upwards.

This needs to be washed in the Terminal which is found in the OS filing organisation at /Applications/Utilities/Terminal

For those not familiar with the Final, information technology really isn't as intimidating as 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 striking enter, some commands give yous no response - it just means the control is done, other commands requite yous feedback.

Using the prefix of sudo is required for commands that have their applications protected in specific folders - when using sudo you volition demand to confirm with your admin countersign or iCloud countersign if ready that way.... let's get to it ...

to start Apache web sharing

sudo apachectl start

to end information technology

sudo apachectl stop

to restart it

sudo apachectl restart

To notice the Apache version

httpd -v

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

Bigsur Macos It Works Webroot

After starting Apache - test 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 can try troubleshooting Apache to see if there is annihilation wrong in its config file past running

apachectl configtest

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

Document Root

Certificate 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 two web roots one at a system level and 1 at a user level - you can fix both up or only run with one, the user level one allows multiple accounts to have their ain web root whilst the system ane is global for all users. It seems there is less effort from Apple in continuing with the user level one but it however can exist gear up upwardly with a couple of extra tweaks in configuration files. It is easier to utilize the user level 1 as you don't have to keep on authenticating as an admin user.

System Level Web Root

- the default organisation certificate root is yet found at -

http://localhost/

The files are shared in the filing organisation 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 set upward but some users are very accustomed to using it.

You need to make a "Sites" binder at the root level of your account then it will work. One time y'all 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 you fix the user configuration file described next.

You have to brand a few additional tweaks to become 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 have one (very likely), then create 1 named past the brusque username of the account with the suffix .conf, its location and permissions/ownership is best tackled past using the Concluding, the text editor 'nano' would be the best tool to deal with this.

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

Bbedit Macos Bigsur Editing

Launch Terminal, (Applications/Utilities), and follow the commands beneath, get-go 1 gets you to the right spot, second one opens the text editor on the command line (bandy 'username' with your business relationship's shortname, if you don't know your account shortname blazon 'whoami' the Terminal prompt):

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

Then add the content beneath swapping in your 'username' in the code below, in that location is a slightly different user directive for Large Sur and Catalina, brand sure 'Crave 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 main httpd.conf and allow some modules:

sudo nano /etc/apache2/httpd.conf

And make 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.so
LoadModule include_module libexec/apache2/mod_include.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so

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

Relieve all your changes (Control + O in nano)

Then open another Apache config file and uncomment another 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 exist read:

sudo apachectl restart

Then this user level certificate root will be viewable at:

http://localhost/~username/

You should just see a directory tree like construction if the folder is empty.

Macos User Web Root

Override .htaccess and allow URL Rewrites

If you are going to use the web serving document root at /Library/WebServer/Documents it is a skilful idea to allow any .htaccess files used to override the default settings - this tin can be achieved by editing the httpd.conf file at line 217 and setting the AllowOverride to All and then 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

Likewise while hither allow URL rewrites then your permalinks look clean, not ugly.

Uncomment in httpd.conf - should exist uncommented on a make 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

Employ "command" + "due west" to search within nano and search for 'php' this will country you lot 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 'command o' and 'control 10'

Reload Apache to boot in

sudo apachectl restart

To see and exam PHP, create a file name it "phpinfo.php" and file information technology in your document root with the contents below, so view information technology in a browser.

          <?php phpinfo(); ?>

Macos Php Legacy

Hither yous will see that Apple are not intending on bundling PHP in the macOS in the time to come, possibly with the next incarnation of the Bone, but for now it's working albeit not version 7.4. Nevertheless you tin apply a Homebrew PHP solution that allows for any PHP version to be used.

          [electronic mail protected]          Documents % php -v Alert: PHP is non recommended PHP is included in macOS for compatibility with legacy software. Hereafter versions of macOS will non include PHP. PHP vii.3.24-(to exist removed in future macOS) (cli) (congenital: Dec 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 Large Sur and needs to exist dowloaded from the MySQL site.

The latest version of MySQL 8.0.23 does work with the latest release of macOS.

Use the macOS 10.fifteen (x86, 64-chip), DMG Archive version (works on macOS Big Sur).

Macos Mysql Download

If you are upgrading from a previous macOS and have an older MySQL version you do not accept to update information technology.

Also if y'all have a clean install and want 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 product set ups)

Mysql Product Archives

One thing with MySQL upgrades, always take a data dump of your database in case things go due south and before you lot upgrade to macOS Catalina make certain your MySQL Server is not running.

When downloading y'all don't take to sign upwards, look for » No thanks, merely start mydownload - become straight to the download.

Once downloaded open the .dmg and run the installer.

During the MySQL procedure you are prompted to choose between potent and legacy password encryptions, since version 8 is entirely new, some software like phpMyAdmin can't connect with the newer encryptions - so if you are going to use a GUI wrapper similar phpMyadmin I suggest you stick to legacy.

Macos Bigsur Mysql Legacy Password

Then add together a password for the MySQL root user.

Macos Bigsur Mysql Root Password

Add Mysql to your path

After installation, in order to utilize MySQL commands without typing the full path to the commands you demand to add the mysql directory to your shell path, (optional step) this is done in your Zsh shell contour ".zshrc" file in your home directory (previous shells were bash ), if you don't have that file only create information technology using six or nano:

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

The first command brings y'all to your domicile directory and opens the .zsh file or creates a new ane if information technology doesn't exist, so add together in the line above which adds the MySQL binary path to commands that you can run. Leave the file with type "command + x" and when prompted to save the modify by typing "y". The last thing to do here is to reload the shell for the above to work straight away.

source ~/.zshrc

Change the MySQL root password

(This section is left in for reference - in previous macOS MySQL packages the countersign set during the installation process would fail - hence the info beneath. This newer version, even so, seems to work).

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

Stop MySQL

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

Start it in safe fashion:

sudo mysqld_safe --skip-grant-tables

This volition be an ongoing command until the process is finished so open some other shell/final window, and log in without a countersign every bit root:

mysql -u root
Flush PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

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

\q

Start MySQL

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

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 system preference also has the uninstall characteristic - useful if yous've installed it with a security encryption that's not working for y'all and want to attempt the other one. You can too run into the paths to the config and information sources of MySQL in the configuration tab.

Or to Command line start MySQL.

sudo /usr/local/mysql/back up-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 y'all into a shell interactive dialogue with MySQL, blazon \q to exit.

Fix the 2002 MySQL Socket error

Ready the looming 2002 socket error - which is linking where MySQL places the socket and where macOS thinks it should exist, MySQL puts it in /tmp and macOS looks for information technology 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 fix the 2002 socket error if you haven't done and then from the MySQL section-

sudo mkdir /var/mysql
sudo ln -due south /tmp/mysql.sock /var/mysql/mysql.sock

Macos Phpmyadmin Download

Download phpMyAdmin, the zippo English package will accommodate a lot of users, then unzip it and move the binder with its contents into the document root level renaming folder 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 connexion, click new server.


Switch to the Authentication tab and set the local MySQL root user and the countersign.
Add in the username "root" (maybe already populated, add together in the password that you lot set up earlier for the MySQL root user set up, click on save 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 now 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 information technology'due south a local development it shouldn't exist a security issue.

Permit's say that you have a site in the User Sites binder at the post-obit location ~/Sites/testsite you would set it to be writeable like and so:

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

If you are concerned about security then instead of making it earth writeable you tin set the owner to be Apache _www just when working on files you would take to authenticate more than as admin you are "non" the possessor, you would do this similar so:

sudo chown -R _www ~/Sites/testsite

This will fix the contents recursively to exist owned by the Apache user.

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

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

Another more straightforward way to do this if you take a ane user workstation is to alter the Apache web user from _www to your account.

That'due south information technology! Y'all now have the native AMP stack running on tiptop of macOS Large Sur or Catalina.

To gear up vritual hosts aka vhosts on Apache cheque the guide hither.

If you are a WordPress user and desire a smoothen lean local evolution environment - too worth checking out is Laravel Valet which runs on top of macOS - check out my Valet WordPress Guide on macOS.

Download Phpmyadmin for Mac Os X Lion

Posted by: gracehenew1966.blogspot.com

Post a Comment

Previous Post Next Post