Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

mySQL administrative tools Apps
If you've installed mySQL and PHP for creating web-enabled databases, you've probably become quite familiar with the pure UNIX interface to mySQL. For example, you'd type DESCRIBE tablename for a list of the field definitions in a table; to add a row to a table, the syntax is INSERT INTO tablename (fieldname1, fieldname2) VALUES (expression1, expression2). In other words, completely un-Mac-like and non-intuitive ... but quite powerful!

While you can't avoid all of this hassle of the non-GUI interface, there are a couple of tools out there that make managing mySQL databases much easier. The first is an OS X (Carbon) application called MacSQL Monitor from Runtime Labs. This is a shareware ($40) package that puts a very nice Mac GUI on your mySQL databases. The demo version has limited export capabilities, and will run 10 queries each session.

My personal favorite, though, is phpmyadmin, from This is a collection of PHP scripts designed to help you manage mySQL databases, and it's available free of charge. Through the web-based interface, you can easily create tables, browse records, run queries, modify properties, drop tables, and add/delete entire databases. It's the tool I use when I have to work in the raw database files on the macosxhints website. Read the rest of this article if you'd like an overview of installing myphyadmin.

The installation process is really quite simple. First, download the package from the website. You can download a version for files named with .php or .php3; I have my server configured for .php files, so that's the one I chose. Once it's downloaded, unzip or untar the file. This creates a folder called phpMyAdmin_2_1_0_0, inside of which is another folder called phpmyadmin. Inside of that folder is a Documentation.html file. Open this in your browser, and read and follow its instructions relative to securing your database! Keep in mind that if your machine is publicly connected, phpmyadmin will technically be usable over the net!

Next, edit the file and replace host (usually localhost if you're using it locally), username, and password with applicable values for your setup. Once that's done, I simply moved the phpmyadmin directory to the /Library/WebServer/Documents folder, and then opened in my browser. I was now looking at an overview of all my local databases and their tables. Structures are easily viewed, and you can browse the records in any table with the click of a button. phpmyadmin has saved me literally hours of work over the few months that I've been using it - highly recommended!
  • Currently 3.00 / 5
  You rated: 5 / 5 (8 votes cast)

mySQL administrative tools | 6 comments | Create New Account
Click here to return to the 'mySQL administrative tools' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I have to agree
Authored by: foamy on Feb 16, '01 07:58:52PM

phpmyadmin is the way to go for administering mysql databases. Until (if) Apple creates a better gui for mysql, then phpmyadmin is the way to go.

Any ideas on how to be able to use it over the net in a secure fashion? I protected the directory with .htaccess, but don't know if that is good enough?

[ Reply to This | # ]
.htaccess enough? maybe
Authored by: Anonymous on Apr 03, '01 03:30:24AM

i think you need SSL as well otherwise the .htaccess transaction is sent in an unencrypted packet(s)...? but i'm not sure. mod_ssl is in the apache for os x but it's not on (commented out) and i can't seem to find instructions for how to configure it. if it's on the apache site, it's buried.

[ Reply to This | # ]
.htaccess enough? maybe
Authored by: Gwyrrdin on Apr 14, '01 01:11:10PM

have you tried it already?

i'm pretty curious to this as well?

anyone on SSL?


[ Reply to This | # ]
share your htaccess setup?
Authored by: theolog on Feb 10, '02 11:39:08AM

Any chance you'd be willing to share your .htaccess setup (i.e. instructions on how to cinfigure this)? I want to use the Apache <Directory> directive to lock things down, but haven't gotten the syntax down pat . . . any help sure would be appreciated :-)

[ Reply to This | # ]
Problems with Install
Authored by: jtrascap on May 28, '01 11:38:31AM

This is beginning to drive me nuts, mostly because I don't know mysql, so
I'm hoping someone can point me in the right direction.

The problem seems to be that my install of mysql only works with the mysql account.
I can't do a "mysqladmin" or even "mysql" under any other account, even root. This
seems to be screwing up getting phpMyAdmin to work - even with the correct
account in the config, it won't connect.

Is there a way to change the accessibility of mysql (so it's usable under a root account,
for example) without having to reinstall mysql?

(PS: Any recommendations for books on this greatly appreciated. In fact, if you can help
me sort this out, I'll get you drunk next time you're in Amsterdam! How's that for a bribe?!)

[ Reply to This | # ]
Problems with Install
Authored by: ajr on Feb 10, '02 01:59:20PM
in order to give other access to tables log in where you do have access.
type in the following lines

Grant all on tablename.* to "username"@localhost identified by 'password' with grant option;

flush privileges

You should now be able to do anything to the table you specified using the username and password you specified.

As for books I have the orielly mysql/msql book which is really good. Also the online manual is pretty extensive and helpful.

[ Reply to This | # ]