Quantcast
A Graphics.com site
William's picture
183 pencils

more on MySQL

Following on from yesterday's tip about MySQL, I thought I should mention a few tips for working with MySQL.

1 - A great MySQL admin tool, from MySQL.com, MySQL Administrator. This lets you stop/start and manage all aspects of the server. eg to enable query logging.

2 - In the development stages enable query logging and run a tail. This allows you to see exactly what is being sent to the server, and is a great tool when debugging.

Go download and install the MySQL Admin tool...

To enable logging go to Options -> Log Files -> Pencil icon and enter a file name

eg: /usr/local/mysql/data/query.log

Stop and Start the server.

Now in the terminal type:

sudo tail -f /usr/local/mysql/data/query.log

Now any time a query is made against the MySQL Database, it wil be logged here.

You could of course enable logging by editing the file /etc/my.conf, however many people find this simpler.

Travholt's picture
6 pencils

You know, I looked and looked at the MySQL Administrator page the other day and couldn't find a download link/page anywhere, so I kind of assumed it was a commercial product and that they didn't want to say so until you'd decided that this was something you really wanted. I never thought to look under the "Related pages" heading. What a stupid place to put it. It should be right there on the first "Overview" page!

All in all I find the MySQL overly complex and difficult to navigate.

sugar's picture
38 pencils

...I use phpMyAdmin and php to echo my queries, to see if something is wrong with them.

It looks like a cool program, but I wouldn't download it and install it just because it can help me in database debugging.

Any other cool features it has?

William's picture
183 pencils

The reason you would want to enable the query logging was if you weren't sure what query was being sent to the database. If you just want to run queries it would be quickest to use the mysql console.

However if you are generating your queries on the fly with PHP, and something is not working as expected, this can be helpful to see what queries are being generated.

awoyemia's picture
10 pencils

I agree with William. You need logging also to debug which of your queries are slow so you can think of better ways of optimising them.

rampy's picture
61 pencils

I read HERE that installing Adobe Version Cue will make a mess of your existing MySQL installation, anybody know about this? Ways to work around it or patches available?

Thanks!

William's picture
183 pencils

This is entirely possible, though I had never heard of this happening.

You could run your database on a different port, or even better, run it wth networking disabled. You would then connect to a different socket.

I don't have any Adobe products installed, so can't test, however if you want I could have a look at your machine.

Send me an email if you want me to have a look. If there is a conflict then i could write another article about this problem. Just need SSH access.

Will

rampy's picture
61 pencils

Thanks Will, I dont have Adobe CS too! I'm just a worry wart ...

I guess if you are going to install Adobe Version Vue on a system that has MySQL, one precaution is to first backup your existing MySQL databases ...

Latest critique

  • Frey's Boutique
  • New Macsolutions logo /BC - Advice Appreciated

On Demand Videos

Photoshop: From Ho-hum to Wow!
You can use Photoshop to bring out the magic of photos that are muddy, soft, or blandly composed.
watch a preview

On Demand Videos: Video tutorials for advertising pros and designers providing tools and information you can trust — and use — on your very next project. Subscribe today!

Creativebits recommends

stocklogos.com logoawards.mediabistro.com

Marketplace