Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
10 Newer Entries Showing entries 31 to 36

Displaying posts with tag: howto (reset)

MySQL Cluster: Listen and know what's going on
Employee +0 Vote Up -0Vote Down

You're not scared of writing clusterious code and eavesdropping is your favorite pastime at work? You want to know what's going on in your MySQL Cluster but were afraid asking? The MySQL Cluster Management API can help you!

Below you'll find example C-code that will get you started with MGM API. It's rather dull at first, but imagine you, instead of printing the event information, taking action. Imagine you starting another thread where you run some procedure which tells a monitoring system: "Hey! Some error happend!". Imagine you spending countless hours of clusterious fun with this API!

The example listens for events in 4 categories (Statistic, Info, Error and Checkpoint) with the

  [Read more...]
Want to compile a MySQL Cluster MGM API application?
Employee +0 Vote Up -0Vote Down

Here is a quick way to compile a simple MGM API application. The example will get the state of all nodes in MySQL Cluster (http://www.mysql.com/products/database/cluster/) and print whether they are connected or not.

All this without a Makefile, we just want to have some simple example on Linux to see how it works. It's basic, maybe, but sometimes useful to just have a peek.

Requirements! We assume that:

  • you installed MySQL Cluster 6.3 or higher, preferably under /usr/local/mysql,
  • your cluster is up and shiny,
  • and ndb_mgmd runs on the same machine you are compiling the MGM API test application on.
  • The code, save it in a file called mgmapi_test.cc (from the

      [Read more...]
    Settingup DBT-2
    Employee +0 Vote Up -0Vote Down
    DBT-2 is a TPC-C like OLTP benchmark, and very popular amongst many MySQL users. It is used by MySQL QA team to test the stability and performance before release. However, steps to setup DBT-2 is a little bit messy, and its README files include some dummy information. So I introduce you these steps below:

    1. Download it!

    You can download the source code from here: http://osdldbt.sourceforge.net/

    2. Required packages

    The following perl packages are required to build DBT-2. Unfortunately, configure script doesn't complain even if they are missing. Install them using, e.g. CPAN.

    shell> sudo cpan Statistics::Descriptive
    shell> sudo cpan Test::Parser
    shell> sudo cpan Test::Reporter

    If you want to make a graph from the output, you have to install gnuplot in advance.













      [Read more...]
    OpenSolaris, Bazaar and SSH
    Employee +0 Vote Up -0Vote Down
    Just a small tip for using Bazaar on OpenSolaris: set the BZR_SSH environment variable to openssh if you don't have the Python module Paramiko installed.
    For example, in your ~/.bashrc:

    export BZR_SSH=openssh

    Could be useful if you're pulling MySQL (http://www.mysql.com/) stuff from Launchpad and use (Open)Solaris. Could also be useful on other Unix-like operating systems when the default is missing (Bazaar uses Paramiko as default).
    Blueprints Wiki - Best Practices on ZFS, MySQL, Hadoop, and much more
    Employee_Team +0 Vote Up -0Vote Down

    I just bumped into the Sun BluePrints Wiki and I think it is worth a visit. It is a companion to the BluePrints Blog and part of the move towards Self-Published Content at Sun, which increases agility and responsiveness to user's needs.

    The Recent Content page lists chronologically the latest changes. The more recent entries are created in Wiki format, while the earlier ones are PDF attachments.

    Some of the documents that caught my attention include:

      [Read more...]
    How to compile a C++ MySQL UDF on OSX 10.4
    +0 Vote Up -0Vote Down
    Recently, I came upon Baron Swartz's (xaprb's) great now_usec UDF:
    http://www.xaprb.com/blog/2007/10/30/how-i-built-the-now_usec-udf-for-mysql/


    I use an Intel Macbook Pro for my primary development environment. GCC on OS X has some interesting quirks. Usually to compile a UDF on GNU/Linux I use the following command line:

    gcc -fPIC -Wall -I/usr/include/mysql -shared -o udf_now_usec.so udf_now_usec.cc


    When I tried to execute the above on my OS X box, I got some errors:

    $ gcc -fPIC -Wall -I../include -shared -o udf_now_usec.so udf_now_usec.cc
    i686-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
    /usr/bin/ld: Undefined symbols:
    _main
    ___gxx_personality_v0</b>
    collect2: ld returned 1 exit status
    


    The first error











      [Read more...]
    10 Newer Entries Showing entries 31 to 36

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.