Howto: MySQL on Mac OS

Here's a howto about installing MySQL on Mac OS tiger.
First you need the MySQL installation package for Mac OS.
You can download it here.

The package contains a readme file, the MySQL application itself, and a MySQLStartupitem, for automaticly starting MySQL server at boot up. The package also contains a prefPane file, which controls the MySQL server.

First install the MySQL application, and the prefPane file, and if necessary the Startupitem.

After this, we're going to add 2 aliases, mysql and mysqladmin:
    #> alias mysql=/usr/local/mysql/bin/mysql
    #> alias mysqladmin=/usr/local/mysql/bin/mysqladmin

It's highly recommended to change the password, which is blank per default.

Enter the following commands:
    #> mysql -u root mysql
    #> SET PASSWORD FOR root@localhost=PASSWORD('mypassword');
    #> mysql -u root mysql
    ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
In this example, we set the root password to mypassword. Note from the above that the password wasn't set. If we try this again, we need to use the -p option to enter the password:
    #> mysql -u root -p mysql

To reset a root password that you forgot (using paths on our system):
    mysqld --skip-grant-tables --user=root
Go back into MySQL with the client:
    [root@host root]# mysql
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 1 to server version: 3.23.41
    Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

    mysql> USE mysql

    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed

    mysql> UPDATE user
    #> SET password=password("newpassword")
    #> WHERE user="root";

    Query OK, 2 rows affected (0.04 sec)
    Rows matched: 2 Changed: 2 Warnings: 0
    mysql> flush privileges;
    Query OK, 0 rows affected (0.01 sec)

    mysql> exit;
    [root@host root]#killall mysqld
Comments (0)  Permalink

Howto: Moving Home directory to another volume

After this guide, whenever you reinstall Mac OS X, you can erase your OS X partition and not have to worry about losing your data. It will all be located on a seperate volume or hard drive. When your new system is up and running, you can simply reconnect your Users directory and go your way.
Read whole postComments (0)  Permalink

Mac OS-like Metacity button position

You can change metacity window button position (minimize,maximize, close) from the right position as Ubuntu default position to the left position like the window of OSX.

  • Open Terminal and start gconf by typing: “gconf-editor” (without quotes) and hitting enter. This program is a bit like the registry editor for windows.
  • In the tree on the left you need to go to “/apps/metacity/general/”. Search for a key in the right pane called “button_layout“.
  • Edit this key so that it reads: “close,minimize,maximize:menu".
  • Comments (0)  Permalink

    Howto: Download files from the web via the OS X command line

    Isn't it frustrating if you can't restart your browser when you're in the middle of a download ?
    Well here's a solution. Just use the terminal with the 'curl' command to download your (big) files.

    Let's download Colloquy for example (http://colloquy.info/downloads/colloquy-latest.zip).

    Open up terminal, and browse to the prefered download folder, IE:
    cd ~/Desktop
    Initiate the download:
    curl -o http://colloquy.info/downloads/colloquy-latest.zip
    Screenshot:
    curl download
    Comments (0)  Permalink

    Howto: Dual boot Mac OS x86 and Windows XP

    Here's a small howto about dual booting Mac OS and Windows xp with the Windows bootloader method.

    • Partition your hard drive accordingly.
    • Download Mac OSX Tiger DVD.
    • Install Mac OSX on a partition.
    • Restart the computer with a Win 98/ME start cd or disk.
    • Start fdisk, set Win XP partition as active.
    • Copy chain0 to c:\.
    • Add chain0=”Mac OSx86” to boot.ini in Win XP.
    • Restart.
    • Enjoy dual booting.
    Comments (7)  Permalink
    1-5/5