There is an old trick from Dos days (still valid in all windows under cmd prompt or even command.com) when we wanted to create a quick file without loading up edit (edit.com) was to use copy con. The exact syntax is: copy con filename
1. Login to the Admin account (not the normal account) 2. Open up a command shell in the Terminal application by selecting - Macintosh HD -> Applications -> Utilities -> Terminal
Let's look at all the ways to change MySQL password, for root and other users: In MySQL the default password is empty. This is inherently unsafe and should be immediately changed. Here is how you can change MySQL default root password:
AWK is an extremely versatile and powerful language for processing files and text data. Often you can use awk to perform complex tasks on Unix / Linux / Mac OS command line which would otherwise take a full-fledged programming effort. AWK is great for log processing, creating custom scripts which will then be executed and more. For example I wanted to create a backup of all of my MySQL databases, each to a separate file after compressing them with gzip (maximum compression). I already created a list of databases on my MySQL server is a file named databases (how original!). Here is the awk script which processes the file and creates another file (named database_backup) which contains commands to backup all the databases as specified above.
PHP is not only a very competent web development language (and part of LAMP stack). It is also a very capable language for writing (command line) scripts. You can write simpler and cleaner scripts with php than perl. Here is a php code which takes a file name as input, trims whitespace from each line of the file and finally saves the result back in the same file.
Older News
S M T W T F S
23 24 25 26 27 28 29
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
Copyright© 2011 The Gaea Times