Wednesday, March 7, 2012

MySQL tips for mysqladmin and mysql dump

Work on the website prime-exposure has halted for the time being. However, I have been working hard on some other projects that will be going live soon and will be much more impressive.

The purpose of this post is to lend a few gems of knowledge I have gained in my hours of trawling through stackoverflow and other forums, it's going to be brief and to the point and I'm afraid it's only for OS X (although other unix like operating systems will be similar):

mysqladmin


When I first downloaded and installed MySQL the tools in "/usr/local/mysql/bin" weren't working. When I tried to use them I got a "command not found error" from the terminal. Here is the complete dummies guide to fixing that problem, leave a comment if you want more help:

1. Open terminal.
2. type in "sudo nano /etc/paths" (not including the speech marks)
3. Enter your password (the one you use to log on to your computer NOT any MySQL passwords)
4. add "/usr/local/mysql/bin" (not including speech marks) to the end of the file so that it looks like this:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/mysql/bin

or similar, it doesn't matter if the others aren't there (for the pursose of this argument anyway)

5. Press Ctrl + O to save
6. Press enter
7. Press Ctrl + x to exit the nano editor
8. Quit the terminal
9. Restart it (open it again)
10. Type "cd /usr/local/mysql/bin" (yup, you guessed it, no speech marks)
11. All the tools (including mysqladmin) should be working, type mysqladmin and hit enter to check.

Generally, unless you have set your permissions such that you don't have to, you should type "sudo" (as in "sudo mysqladmin") before using the tools in this folder.

mysqldump


This is a handy tool for backing up or transporting your database(s).

The step that is missing from everywhere else is:
1. Open terminal
2. Type "cd /usr/local/mysql/bin"
3. Follow the instructions from the MySQL manual pages, I know they're almost impenetrable but it will do you good.

Monday, January 30, 2012

Website progress Jan 30th 2012

The two new articles: The Photographer's [EYE] and Photography and the law are up on the site. I have also arranged for a guest appearance which should be up and running by the end of February so stay tuned to the blog for updates on that. I am also redesigning the backend of the site using PHP so that it scales better.

Also new content of mine will be put up at the same time as the guest contribution.

Sunday, January 8, 2012

Website updates

prime-exposure.co.uk has been well received so far and updates will be on the site soon. Major updates to the functionality are going to have to wait a while but the two promised articles: review of "The Photographer's Eye" and "Photography and the law", will be up this week.

Plans for guest contributions to the site are also coming along nicely so stay posted for new content. I will keep you updated of technical updates and "coming soon" for the site on this blog.