Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Installing phpMyAdmin on Mac OS X

From: Installing Apache, MySQL, and PHP

Video: Installing phpMyAdmin on Mac OS X

There are many great free tools to allow you to manage your MySQL databases, but one of the simplest and easiest to get started with is phpMyAdmin, a free web application which you can download from www.phpmyadmin.net. You can either go to this site and download the most recent version, or you can use the version that I've included in the free exercise files that come with this course. To use that version, go to the Free Exercise Files, to phpMyAdmin.

Installing phpMyAdmin on Mac OS X

There are many great free tools to allow you to manage your MySQL databases, but one of the simplest and easiest to get started with is phpMyAdmin, a free web application which you can download from www.phpmyadmin.net. You can either go to this site and download the most recent version, or you can use the version that I've included in the free exercise files that come with this course. To use that version, go to the Free Exercise Files, to phpMyAdmin.

The entire web application is in this very small zip file. Extract the zip file, then move the resulting folder, phpMyAdmin with the version number, to your Apache document root. To do that, I'll press Command+N to create a new finder window, I'll go to the Mac hard drive root, then to Library/WebServer/Documents, and then I'm going to drag this folder into the document root. After it's been dragged into place, I'll rename it with simply phpmyadmin.

You can name the folder anything you want, but by naming it simply phpmyadmin all lowercase, it will make it very easy to access from the web browser. Now let's check a few things before we try to fire it up. Go to your System Preferences dialog and from there, to the MySQL pane, and make sure that MySQL is running. Then you can close that dialog. You're done with that for now. Then go to a browser and navigate to the URL http://localhost/phpmyadmin.

You should see this login dialog. If you try to log in right now, it's not going to work, even if you type in the correct username and password for your MySQL Installation. I will type in type in "root" and then my password and click Go, and I will see an error saying, "Cannot log in to the MySQL Server." There's also a very obscure message down at the bottom: "The mcrypt extension is missing. Please check your PHP configuration." All of these problems can be easily solved with a very small configuration file, and I have provided the most minimal version of this configuration file, again, in the free exercise files.

I'll go to the Free Exercise Files, to the phpmyadmin folder, and I am going to use this file, config.inc_MAC.php. Now I want to leave the original file in place, so I'm going to copy that to the clipboard, then I'll go back to my document root folder, to phpmyadmin, and I will paste by pressing Command+V. Now I'm going to rename the file, taking out the _MAC.

I'll click on the file once and then press Return and then remove _MAC, so that the actual name of the file is config.inc.php. Next, I am going to edit it. You can use any text editor for this purpose. And I'll show you that this file has some basic settings in it. The socket configuration on the fourth line is referring to something called a socket file, which is created automatically by MySQL when it starts up on your system.

On Mac OS X, this file is in the TMP folder. You shouldn't have to change that line at all. The next line refers to the username. I am using root, the administrative user that's created automatically when you install MySQL--and again, you can use that for local development. Next is the password. I have simply password, but you should change this to reflect your MySQL password. The next item, auth_type, changes to a different authentication model named config, and this will remove that confusing mcrypt error that you saw earlier.

And finally, there's a configuration item named AllowUserDropDatabase. By default, you as an individual user won't be able to drop or delete your own databases. I've reset that value to true. So if you need to make changes to the user and password, go ahead and do it and save your changes, but leave everything else alone and then close your text editor. Now to test go back to your browser, once again type localhost/admin, and when it opens, it may show the same screen, but press Command+R to refresh the screen and now phpMyAdmin should open correctly.

To test and make sure that you can create and delete databases, I have provided an SQL file. First click Databases and create a new database. I'm going to name it explorecalifornia and click Create. Then over on the left I will click on my new database. Now, I'm going to import some structure and data from an SQL file. I'll click Import at the top, choose File, then in my free exercise files folder, I will choose explorecalifornia.sql.

I will scroll down to the bottom and click Go, and I should see the message that the database has been imported correctly. I can go over to the left side and see the database in my list, and if the database is selected, I should be able to browse the data. Now test that you can drop the database. Up at the top of the screen, I will go to the list of my pages, and I'll click explorecalifornia, and this takes me back to the database page. I will go to the Operations screen.

I'll take a look over on the left, and I should see a link that allows me to drop the database. This is the tool that was enabled by that additional configuration in the configuration file. I will click the link and confirm and now the database is gone. So that's how you get started with phpMyAdmin. I should caution that the minimal configuration that I provided is perfectly suitable for local development. If you want to put phpMyAdmin on your production PHP server--that is, a server that's available to the public--check the phpMyAdmin documentation for the recommended configuration for a more secure installation.

Show transcript

This video is part of

Image for Installing Apache, MySQL, and PHP
Installing Apache, MySQL, and PHP

39 video lessons · 46395 viewers

David Gassner
Author

 
Expand all | Collapse all
  1. 17m 35s
    1. Welcome
      1m 9s
    2. Understanding Apache, MySQL, and PHP
      7m 12s
    3. Using the exercise files
      1m 7s
    4. What's new in this update
      3m 35s
    5. Choosing a software stack
      4m 32s
  2. 30m 18s
    1. Installing Apache HTTP Server 2.4 on Windows
      6m 51s
    2. Installing PHP 5.5 on Windows
      4m 12s
    3. Starting Apache from the command line
      5m 24s
    4. Installing MySQL on Windows
      7m 24s
    5. Installing phpMyAdmin on Windows
      6m 27s
  3. 44m 5s
    1. Activating Apache on Leopard and Snow Leopard
      3m 35s
    2. Activating Apache on Lion
      5m 9s
    3. Activating Apache on Mountain Lion and Mavericks
      4m 57s
    4. Configuring personal site folders on Mountain Lion and Mavericks
      6m 59s
    5. Activating PHP on Mac OS X
      6m 12s
    6. Installing MySQL on Mac OS X
      3m 59s
    7. Setting the root user password
      2m 28s
    8. Installing phpMyAdmin on Mac OS X
      6m 16s
    9. Uninstalling MySQL on Mac OS X
      4m 30s
  4. 14m 35s
    1. Installing WampServer
      6m 25s
    2. Managing WampServer
      2m 2s
    3. Defining directory aliases through WampServer
      2m 55s
    4. Changing software versions with WampServer add-ons
      3m 13s
  5. 10m 58s
    1. Installing MAMP
      4m 6s
    2. Configuring Apache and MySQL server ports
      1m 57s
    3. Managing MAMP
      4m 55s
  6. 29m 3s
    1. Installing XAMPP for Windows
      10m 0s
    2. Managing XAMPP for Windows
      4m 4s
    3. Managing MySQL security through XAMPP for Windows
      2m 40s
    4. Installing XAMPP for Mac OS X
      6m 14s
    5. Managing XAMPP for Mac OS X
      2m 27s
    6. Managing MySQL security through XAMPP
      3m 38s
  7. 13m 20s
    1. Installing BitNami for Windows
      6m 31s
    2. Installing BitNami for Mac OS X
      6m 49s
  8. 18m 49s
    1. Handling port conflicts with Skype on Windows
      2m 37s
    2. Handling other port conflicts on Windows
      5m 19s
    3. Detecting and handling port conflicts on Mac OS X
      6m 26s
    4. Configuring Apache to work with IPv6 on Windows 8
      4m 27s
  9. 31s
    1. Goodbye
      31s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Installing Apache, MySQL, and PHP.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.