Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Previous 30 Newer Entries Showing entries 31 to 60 of 1058 Next 30 Older Entries

Displaying posts with tag: Linux (reset)

Simple MySQL: using TRIGGERs to keep datetime columns updated without direct SQL calls
+0 Vote Up -0Vote Down

If you’ve ever used non-opensource code, or applications that you don’t have complete control over, then you may have run into situations you need to alter data on a per-row basis but been unable to do so for lack of application SQL access. The solution to this type of problem is to use a MySQL TRIGGER, which allows us to execute arbitrary SQL commands when defined events occur. Why is this useful and how does it work? Well…

For example, I have a freeRADIUS server that uses MySQL as a backend for the user authentication, and one of my server applications (HostBill) provides a freeRADIUS plugin that allows my users to manage their RADIUS accounts; however the default freeRADIUS schema lacks a DATETIME column on the user table. When a user is created (INSERT) or has their password changed (UPDATE)

  [Read more...]
Meeting the MySQL Team at UKOUG (ICC Birmingham, December 3-5 | 2012)
+4 Vote Up -1Vote Down
If you're planning to attend UKOUG in Birmingham on Dec 3-5, here's your guide to know more about Oracle's MySQL.

There's a MySQL stream on Monday 5th and we've a great list of sessions, including:



  [Read more...]
MySQL Performance: InnoDB vs MyISAM in 5.6
Employee +9 Vote Up -0Vote Down

Since the latest changes made recently within InnoDB code (MySQL 5.6) to improve OLTP Read-Only performance + support of full text search (FTS), I was curious to compare it now with MyISAM..

While there was no doubt that using MyISAM as a storage engine for a heavy RW workloads may become very quickly problematic due its table locking on write design, the Read-Only workloads were still remaining favorable for MyISAM due it's extreme simplicity in data management (no transaction read views overhead, etc.), and specially when FTS was required, where MyISAM until now was the only MySQL engine capable to cover this need.. But then FTS came into InnoDB, and the open question for me is now: is there still any reason to use MyISAM for RO OLTP or FTS wokloads from performance point of view,

  [Read more...]
Installing MySQL Workbench in Ubuntu 12.10
Employee_Team +2 Vote Up -0Vote Down

Last month Ubuntu 12.10 was released and we tried to install MySQL Workbench on it. So we went to http://www.mysql.com/downloads/workbench/ (http://www.mysql.com/downloads/workbench/) and downloaded the .deb file for the most recent Workbench version (5.2.44 as of this writing). We then opened the .deb file with the Ubuntu Software Center application and tried to install it. Unfortunately the following message appeared:

Dependency is not satisfiable: libctemplate0

The problem here is that the libctemplate package provided by Ubuntu 12.10 corresponds to a higher version (libctemplate2). Installing this version instead wouldn’t work since MySQL Workbench is linked against the older one. We’ll handle this dependency issue in

  [Read more...]
Remote MySQL Performance And Query Monitoring
+0 Vote Up -0Vote Down

Remote MySQL Performance and Query Monitoring

There may be the situation that you have to monitor a MySQL server remotely. There are some linux tools to do performance and query monitoring locally, and these tools can also used to monitor remotely - but only unencrypted ! Also often MySQL is only listening on the loopback interface, so it is even not reachable remotely over the net (which is very good seen from the security viewpoint). But there is an easy solution in the Linux world.

#DBHangOps
+0 Vote Up -0Vote Down

Woooo, just wrapped up another night of #DBHangOps, check out the video:

For those of you who aren’t familiar with this awesome series of videos, it’s a bi-weekly meeting of MySQL DBAs via a Google Hangout to simply talk about databases (specifically MySQL). The discussions range anywhere from silly stories to awesome learnings and even little gotchas to know about when working with MySQL operationally. If you’re interested in catching when the next #DBHangops will happen, check MySQL planet for a blog post about it, or check this twitter search.

We look forward to talking with you!

MySQL Performance: Linux I/O and Fusion-IO, Part #2
Employee +5 Vote Up -0Vote Down

This post is the following part #2 of the previous one - in fact Vadim's comments bring me in some doubts about the possible radical difference in implementation of AIO vs normal I/O in Linux and filesystems. As well I've never used Sysbench for I/O testing until now, and was curious to see it in action. From the previous tests the main suspect point was about random writes (Wrnd) performance on a single data file, so I'm focusing only on this case within the following tests. On XFS performance issues started since 16 concurrent IO write processes, so I'm limiting the test cases only to 1, 2, 4, 8 and 16 concurrent write threads (Sysbench is multi-threaded), and for AIO writes seems 2 or 4 write

  [Read more...]
OpenCode: MySQL procedures + python + shell code repositories now public
+1 Vote Up -0Vote Down

I write a fair number of scripts on this site and have posted a lot of code over the years. Generally if I am not pasting the code to be viewed on the webpage then I link to a file that a user can download; which leads to a lot of mish-mash code that doesn’t have a home. I’ve always kept the code files in a private SVN repo over the years but have recently moved them all to BitBucket Git repositories. So here they are: lots of code samples and useful bits of programming to save time.

Generic Shell Scripts: https://bitbucket.org/themattreid/generic-bash-scripts/src
Generic Python Scripts: https://bitbucket.org/themattreid/generic-python-scripts/src
Generic MySQL Stored Procs:

  [Read more...]
This Week in Website Performance
+0 Vote Up -0Vote Down

This Week in Website Performance is a weekly feature of the Monitis.com blog. It summarizes recent articles about website performance. Why? Because your friends at Monitis.com care.


NoSQL or Traditional Database: From an APM Perspective There Isn’t Really Much Difference

Author: Michael Kopp.

If your application is executing more statements or downloading more data than is necessary, no amount of backend tuning will have your site running at the highest level of

  [Read more...]
Speaking at LinuxCon Europe 2012 in Barcelona (Nov. 5-9)
Employee +2 Vote Up -0Vote Down

I feel like I just got back home from Oracle OpenWorld (check out my pictures) and some vacation, but I'll be on the road again next week to attend LinuxCon Europe in Barcelona. I'll be there from Monday (Nov. 5th) until Wednesday evening. Oracle is sponsoring the event and we'll have a booth at the exhibition area (booth #19), handing out free Oracle Linux and Oracle VM DVDs. I'll be at the booth every now and then and plan to give a short introduction and live demo of Ksplice rebootless updates on Monday evening (6:00pm).

  [Read more...]
MySQL Performance: Linux I/O and Fusion-io
Employee +6 Vote Up -0Vote Down

This article is following the previously published investigation about I/O limitations on Linux and also sharing my data from the steps in investigation of MySQL/InnoDB I/O limitations within RW workloads..

So far, I've got in my hands a server with a Fusion-io card and I'm expecting now to analyze more in details the limits we're hitting within MySQL and InnoDB on heavy Read+Write workloads. As the I/O limit from the HW level should be way far due outstanding Fusion-io card performance, contentions within MySQL/InnoDB code should be much more better visible now (at least I'm expecting ;-))

But before to deploy on it any of MySQL test workloads, I want to understand the I/O limits I'm hitting on the



  [Read more...]
Simple MySQL: Converting ANSI SQL to SQLite3
+0 Vote Up -0Vote Down

I was digging through some old project code and found this script. Sometimes one finds oneself in an odd situation and needs to convert regular SQL, say from a MySQL database dump, into SQLite3 format. There’s not too much else to say, but here is a script that helps with the process. It can likely be improved but this handles the items that came up during conversion on initial runs.

#!/bin/sh
####
# NAME: convert-mysql-to-sqlite3.sh
# AUTHOR: Matt Reid
# DATE: 2011-03-22
# LICENSE: BSD
####
if [ "x$1" == "x" ]; then
   echo "Usage: $0 "
   exit 
fi 
cat $1 |
grep -v ' KEY "' |   
grep -v ' UNIQUE KEY "' |
grep -v ' PRIMARY KEY ' |
sed '/^SET/d' |          
sed 's/ unsigned / /g' | 
sed 's/ auto_increment/ primary key autoincrement/g' |
sed 's/ smallint([0-9]*) / integer /g' | 
sed 's/ tinyint([0-9]*) / integer /g' |  
sed 's/ int([0-9]*) / integer /g' |      
sed 's/
  [Read more...]
10 ways I avoid trouble in database operations
+0 Vote Up -1Vote Down

Read the original article at 10 ways I avoid trouble in database operations

1. Avoid destructive commands From time to time I’m working with new recruits and bringing them up to speed in operations. The first thing I emphasize is care with destructive commands. What do I mean here? Well there are all sorts of them. SQL commands such as DROP table & DROP database. But also TRUNCATE [...]

For more articles like these go to Sean Hull's Scalable Startups

Related posts:
  • 5 Ways to Avoid EC2 Outages
  • 7 Ways to Troubleshoot MySQL
  •   [Read more...]
    Upcoming speaking engagements: Oracle OpenWorld, DOAG Conference
    Employee +3 Vote Up -0Vote Down

    It's that time of the year again — the summer holidays are over and the conference season starts!

    I'm very excited to be at Oracle Open World in San Francisco again, where I will pretty busy. On Saturday and Sunday I will attend MySQL Connect, primarily to man the Oracle Linux booth in the exhibition area. But I hope to catch some of the talks as well (I shared my favourite sessions with Keith Larson from the MySQL team in this interview). During Open World, I will help out manning the Oracle Linux demo pods in the exhibition grounds in Moscone South, where we will showcase Oracle Linux with Ksplice and related

      [Read more...]
    The software patent solution has been right here all along
    +0 Vote Up -1Vote Down

    Software patents have been an agent of change in open source over the last decade, as I explained in my keynote at the 8th International Conference on Open Source Systems this week. Most notably, the astonishing proliferation of software patents has forced technology companies to spend a lot of time and energy assembling defensive portfolios.

    read more

    My speaking engagements - Q4 2012
    +2 Vote Up -0Vote Down

    After a long pause in the speaking game, I am back.

    It's since April that I haven't been on stage, and it is now time to resume my public duties.

    • I will speak at MySQL Connect in San Francisco, just at the start of Oracle Open World, with a talk on MySQL High Availability: Power and Usability. It is about the cool technology that is keeping me busy here at Continuent, which can make life really easy for DBAs. This talk will be a demo fest. If you are attending MySQL Connect, you should see it!
    • A happy return for me. On October 27th I will talk about open source databases and the pleasures of command line operations at
      [Read more...]
    MySQL: a convenient stored procedure for memory usage reporting
    +1 Vote Up -0Vote Down

    If you’ve ever been troubleshooting on the MySQL command line and needed to quickly see how much memory is being used then you’ve probably noticed that there are no built in commands to give you this data. Unlike other enterprise databases MySQL doesn’t have a very robust management system built in to help make the DBA’s life easier. It doesn’t come with built in Stored Procedures to report on usage statistics or generate handy reports; so we have to code them and import them to MySQL — no relying on Oracle to help us out here.

    So, here’s a stored procedure that can be imported to MySQL and run whenever you need to see the memory usage statistics. Installation and usage info is built into the SP below. The SP can also be downloaded from the repo:

      [Read more...]
    Join SkySQL and MariaDB at LinuxCon North America!
    +4 Vote Up -0Vote Down

    As Patrik noted last week, MariaDB is taking a leading role in the trend of keeping the MySQL ecosystem an open one. The SkySQL and MariaDB teams work together closely on this, and we even travel together!

    Join both SkySQL and MariaDB at this week’s LinuxCon North America conference in sunny San Diego to learn more about how MariaDB is directly communicating with users (including SkySQL enterprise customers) to not only identify and help fix issues with current releases of the MySQL database, but to also further enhance MariaDB to become even more technologically advanced.

    read more

    Apache Can't Use Remote MySQL Server When SELinux is Enabled
    +0 Vote Up -0Vote Down

    I don't know why SELinux problems seem so frustrating. The problem almost certainly is related to the fact that there is frequently no error message. This is exactly the problem I ran into while turning up a new Apache web server on Red Hat Enterprise Linux 6 (RHEL6) with SELinux enabled.

    The problem is that SELinux prevents Apache from making network connections by default. This is defined by the SELinux boolean httpd_can_network_connect_db. In order to change this value, issue the following

      [Read more...]
    MySQL LDAP Authentication Plugin (Clear password client plugin)
    +1 Vote Up -0Vote Down

    Based on my last post MySQL LDAP Authentication Plugin, I received feedback from MySql Joro Blog by Oracle.

    They told me:

    Insted of writing (and having to deply) your own client plugin you probably can reuse the cleartext client side plugin, specially because it’s available in a number of mysql clients already. Check sql-common/client.c on MySQL 5.5+ for details.

    This is very useful because you only need to put the plugin in server side, and in the client side you only need to check if the clear password plugin is enabled.

    Now, I present the updated code with the only server side plugin, and I reused the cleartext client side plugin from MySql, it’s more short

      [Read more...]
    MySQL LDAP Authentication Plugin
    +3 Vote Up -0Vote Down

    As a continuation of previous post, now, I will show how to make a mysql plugin for ldap authentication.

    Get the mysql-server source code at http://dev.mysql.com/downloads/mysql/ (http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.27.tar.gz/from/http://cdn.mysql.com/)

    Installing necessary packages

    yum groupinstall 'Development Tools'
    yum install cmake ncurses-devel
    

    Download source code, build and start MySQL Server

    wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.27.tar.gz/from/http://cdn.mysql.com/
    tar -xzf mysql-5.5.27.tar.gz
    cd mysql-5.5.25
    
    # Preconfiguration setup
    groupadd mysql
    useradd -r -g mysql mysql
    
    # Beginning of source-build specific instructions
    cmake .
    make
    make install
    
    # Postinstallation setup
    chown -R mysql .
    chgrp -R mysql .
    ./scripts/mysql_install_db
      [Read more...]
    LDAP C Client Authentication Example (with OpenLDAP)
    +0 Vote Up -0Vote Down

    I have the goal of authenticate MySQL users with an LDAP server, currently, employees of my company are authenticated in several services (ftp, ssh, svn) through my LDAP server, except MySQL. (As you can imagine, I need to add manually every user in MySQL, a very tedious task).

    In this post I only leave the example with LDAP authentication.

    Installing necessary packages

    
    yum groupinstall 'Development Tools'
    yum install openldap-devel
    
    

    Source ldapClient.c

    #include <stdio.h>
    #include <ldap.h>
    /* LDAP Server settings */
    #define LDAP_SERVER "ldap://nafiux.com:389"
    int
    main( int argc, char **argv )
    {
    LDAP        *ld;
    int        rc;
    char        bind_dn[100];
    
    /* Get username and password */
    if( argc != 3 )
    {
    perror( "invalid
      [Read more...]
    Linus on Instantiation and Armadaification
    +0 Vote Up -1Vote Down

    I feel a sense of pride when I think that I was involved in the development and maintenance of what was probably the first piece of software accepted into Debian which then had and still has direct up-stream support from Microsoft. The world is a better place for having Microsoft in it. The first operating system I ever ran on an 08086-based CPU was MS-DOS 2.x. I remember how thrilled I was when we got to see how my friend’s 80286 system ran BBS software that would cause a modem to dial a local system and display the application as if it were running on a local machine. Totally sweet.

    When we were living at 6162 NE Middle in the nine-eight 292, we got an 80386 which ran Doom. Yeah, the original one, not the fancy new one with the double barrel shotgun, but it would probably run that one, too.

      [Read more...]
    The blog was down yesterday
    +0 Vote Up -0Vote Down

    The brief outage was due to a scheduled move of the servers to a separate rack and subnet dedicated to our work with the Center for Information Assurance & Cybersecurity (ciac) at the University of Washington Bothell (uwb), and a11y.com

    I am currently exercising the new (to us) equipment and hope to winnow the less than awesome equipment over the next quarter. I spent the last six months finding the best in breed of the surplussed DL385 and DL380 chassis we (work) were going to have recycled. The team and I were able to find enough equipment to bring up one of each with eight and six gigs of memory, respectively. These will make excellent hypervisors for provisioning embedded instances of Slackware, Fedora, RHEL, CentOS, Debian, FreeBSD, OpenSolaris, OpenIndiana, FreeDOS, etc.

    When I initially configured this xen paravirt environment, I failed to plan for integration with libvirt, so I am

      [Read more...]
    A Few Thoughts About OSCon and the Open Source Community
    +1 Vote Up -0Vote Down

    This past week I attended OSCon, the annual conference for open source’s true believers. And there was a religous fervor in the air, particularly from the point of view of someone more accustomed to Oracle conferences.

    And if open source is the religion, proprietary closed-source companies are the devil. That having been said, I was surprised how virtually all large companies were demonized. Even long-time defenders of open source like IBM were ignored at best. That didn’t prevent the from coming though, with Microsoft and HP in particular with high-profile sponsorships and PR offensives that didn’t seem to have much influence with the crowd.

    The companies generating buzz were the small companies built around development of their own open source products. There are a surprising number of them out

      [Read more...]
    Delay or synchronize it?
    +1 Vote Up -0Vote Down

    A couple students in one of my classes ran into a problem when competing Java threads tried to insert new rows in a table. They raised an error when they tried the DELAY keyword to avoid the race (collision) condition in an INSERT statement. It was simple to explain to them that the DELAY keyword doesn’t work with an InnoDB table. Any attempt throws the following error:

    ERROR 1616 (HY000): DELAYED OPTION NOT supported FOR TABLE 'message'

    Important Update: INSERT DELAYED is gone in MySQL 5.6.6 (announcement) and the whole issue comes down to synchronizing threads (some dislike the solution) or using the ON DUPLICATE KEY

      [Read more...]
    Mailbox conversion
    +0 Vote Up -2Vote Down

    Converting from uw-mailboxes (mbx) to Unix format (dovecot)

    It took me by surprise how the mailbox formats had changed, when I switched to Dovecot which is the best IMAP/POP3 mail program, in my opinion. It handles large (enormous) mailboxes with many (hundreds of) users. Caching makes things go fast again.

    Here is a simple bash utility, to take all users, and convert all mailboxes & folders.

    cd /home
    for u in *
    do
    if [ -d /home/$u/Mail ]; then
    echo "User: $u"
    cd /home/$u/Mail

    read more

    Tools: What file system?
    +1 Vote Up -2Vote Down

    On Linux, you have a plethora of File Systems available.

    Recently I was testing databases (MySQL, MariaDB) especially with ThreadPool against a Violin Flash Memory Array, and I forgot what file system the LUN was mounted (and formatted) as.

    There are two ways to find out:

    • df -T (show mounted life systems, along with the FS type)
    • file -s /dev/xxx (show more details about a FS node)

    read more

    NIST::NVD 1.00.00
    +0 Vote Up -0Vote Down

    I’m leaving myself some room for bug fixes. It works for us in house. I would love to help others to give it a try. especially those who could benefit from making nearly immediately answered queries to the NIST’s NVD database.

    The code in this release cannot by itself track the feed from the feds in real time. The nvd entry loader needs a little bit of love in the area of record merging before this starts working. It’s on my TODO list.

    I’m sorry for the outage of git.colliertech.org. I’ll get that back up here shortly. In the meantime, feel free to grab it from this location while the CPAN indexes and processes my submission.

    http://www.colliertech.org/federal/NIST/NIST-NVD-1.00.00.tar.bz2

    don’t forget to check the cryptographic signature:

      [Read more...]
    Log Buffer #275, A Carnival of the Vanities for DBAs
    +0 Vote Up -0Vote Down
    With the rapid advancement in the database technologies, the legacy systems are either being upgraded or they are being replaced or in some cases technologists are finding ways to support them in new ways showing us the flexible nature of databases and the belief of professionals that the sky is the limit. For this Log [...]
    Previous 30 Newer Entries Showing entries 31 to 60 of 1058 Next 30 Older Entries

    Planet MySQL © 1995, 2013, 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.