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 1137 Next 30 Older Entries

Displaying posts with tag: Linux (reset)

Why buffered writes are sometimes stalled
+2 Vote Up -0Vote Down
 Many people think buffered write (write()/pwrite()) is fast because it does not do disk access. But this is not always true. Buffered write sometimes does disk access by itself, or waits for some disk accesses by other threads. Here are three common cases where write() takes longer time (== causing stalls).

1. Read Modify Write

Suppose the following logic. Opening aaa.dat without O_DIRECT/O_SYNC, writing 1000 bytes sequentially for 100,000 times, then flushing by fsync().

fd=open("aaa.dat", O_WRONLY);
for(i=0; i< 100000; i++) {
write(fd, buf, 1000);
}
fsync(fd);
 You might think each write() will finish fast enough (at least less than 0.1ms) because it shouldn't do any disk access. But it is not always true.
 Operating System manages I/O by page. It's 4KB








  [Read more...]
Open Source Enigma Project
+0 Vote Up -0Vote Down

The wild and crazy guys over at S&T Geotronics, James Sanderson and Marc Tessier, have decided to go full tilt with a Kickstarter version of their DIY Open Enigma Project.  For those who missed the fanfare last year, they were featured on Instructables showing how to build an Arduino-based encryption machine that works exactly like a WWII era Enigma.  You know, the thing that

  [Read more...]
Sandboxed MySQL Utilities – HowTo
+0 Vote Up -0Vote Down

Often I would need to work on customer servers where MySQL Utilities would be a really good fit for the tools I need. However, I would not want to mess around with the customer servers just to have it running so I would have the tools built and sandboxed on its own directory where I can cleanup later. Here’s how:

cd ~
wget http://mysql.mirrors.hoobly.com/Downloads/MySQLGUITools/mysql-utilities-1.4.1.tar.gz
tar xzf mysql-utilities-1.4.1.tar.gz
cd mysql-utilities-1.4.1
python setup.py build
python setup.py install --root=/home/revin/mysql-utilities-1.4.1
export PYTHONPATH=.:/home/revin/mysql-utilities-1.4.1/usr/lib/python2.6/site-packages
/home/revin/mysql-utilities-1.4.1/usr/bin/mysqlfrm --help

Your source of the package and install directory may vary – enjoy!

Mac Mini to the rescue
+0 Vote Up -0Vote Down

In teaching, I had a problem because my students have different base operating systems, like Windows 7, Windows 8, Linux, and Mac OS X. I needed a teaching and lecture platform that would let me teach it all (not to mention support their environments). That meant it had to virtualize any of the following with a portable device:

  • Windows 7 or 8 hosting natively an Oracle Database 11g XE, 11g, or 12c and MySQL Database 5.6
  • Windows 7 or 8 hosting a Fedora or Oracle Unbreakable Linux VM (3 or 4 GB) with Oracle Database 11g XE, 11g, or 12c and MySQL Database 5.6
  • Mac OS X hosting a Fedora or Oracle Unbreakable Linux VM (3 or 4 GB) with Oracle Database 11g XE,
  [Read more...]
and now for something completely different…
+0 Vote Up -0Vote Down

As many of you know, I’ve been working in the MySQL (http://www.mysql.com) world for quite a while now. IN fact, it was nearly 10 years ago when I first started hacking on MySQL Cluster (https://www.mysql.com/products/cluster/) at MySQL AB.

Most recently, I was at Percona which was a wonderful journey where over my nearly three years there the company at least doubled in size, launched several new software products and greatly improved the quality and frequency of releases.

However the time has come for something

  [Read more...]
Correcting mysql.sock connection error
+0 Vote Up -0Vote Down

I write this post over to have a quick access to this tutorial than to promote the blog. The problem For Several times this has happened to me, always install a new server, or personal machine. I install mysql ,… Continue Reading →

Continue reading Correcting mysql.sock connection error

Related posts:
  • Corrigindo erro de conexão com mysql.sock
  • zend framework 2 with lighttpd
  • Main Subversion commands
  • Open a port on Fedora
    +0 Vote Up -0Vote Down

    Since MySQL Workbench 6.0 isn’t available for Fedora, Version 20, I’m having my students install it on their local Windows and Mac OS X operating systems. You can configure the /etc/sysconfig/iptables file to enable port 3306 after installing MySQL on Fedora.

    You can open a port by adding the following line to the /etc/sysconfig/iptables file (Fedora’s instructions on editing iptables). The file won’t exist initially, but you can create it by running the following command as the root superuser or sudoer:

    shell> service iptables save

    You you can run the following commands as the root superuser, which

      [Read more...]
    2013 in review: The year of the Linux distro
    Employee_Team +8 Vote Up -2Vote Down

    When looking back at 2013, one of the things that really stand out is what we’ve done with MySQL in Linux distros. At least it stands out to me, but for most people it’s probably the janitorial work that they never notice as long as everything keeps working perfectly. Although invisible to most, this is the important work that makes it possible for all Linux users to run MySQL.

    Most distros are maintained by volunteers doing packaging work in their spare time, and we as software developers should be very grateful for all the work and effort they put into distributing our software (for free!). I know we at Oracle are!

    We’ve had a distro-like project of our own in 2013. We have created our own repositories for various Linux distros (I hope to see more in the future), so that users

      [Read more...]
    Steven Sinofsky on Disruption
    +0 Vote Up -0Vote Down

    There is a good article over at Re-Code by ex-Microsoft VP Steven Sinofsky called "The Four Stages of Disruption".  It describes the evolution of products and markets through disruption, drawing from Sinofsky's own insights and also building on the work of Everett Rogers ("The Diffusion of Innovations") and Clayton Christensen ("

      [Read more...]
    on swapping and kernels
    +1 Vote Up -0Vote Down

    There is much more to write about all the work we do at Facebook with memory management efficiency on our systems, but there was this one detour investigation in the middle of 2012 that I had to revisit recently courtesy of Wikipedia.

    There are lots of factors that make machines page out memory segments into disk, thus slowing everything down and locking software up – from file system cache pressure to runaway memory leaks to kernel drivers being greedy. But certain swap-out scenarios are confusing – systems seem to have lots of memory available, with proper settings file system cache should not cause swapping, and obviously in production environment all the memory leaks are ironed out.

    And yet in mid-2012 we noticed that our new kernel machines were swapping out for no obvious reason. When it comes to swapping, MySQL community will always point to Jeremy’s post on

      [Read more...]
    XtraBackup Complains of Missing perl-DBD-MySQL
    +0 Vote Up -0Vote Down

    I was busy testing a PXC cluster today when suddenly was buffled with a confusing error:

    140108 23:33:39 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' (using password: NO).
    innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at /usr/bin/innobackupex line 2913.

    OK, so my first though was DBD::mysql is missing, but as I checked:

    [root@pxc03 keepalived]# yum list installed| grep perl-DBD-MySQL
    perl-DBD-MySQL.x86_64 4.013-3.el6 @base

    After some digging, it’s not actually the module that is missing – it was one of the module’s dependency which is the mysql client library.

    [root@pxc03 keepalived]# yum deplist perl-DBD-MySQL.x86_64|grep mysql
    dependency: libmysqlclient.so.16()(64bit)
    provider:
      [Read more...]
    Fedora Install of MySQL
    +3 Vote Up -0Vote Down

    I built a new image on VMWare Fusion for my class, which required installing MySQL 5.6 on Fedora, Version 20. If you don’t know how to add your user to the sudoers list, you should check this older and recently updated blog post.

  • Download the MySQL Yum Repository and launch the downloaded RPM.
  • Install MySQL on Fedora, Version 20, which you can find with the following command:
  • shell> rpm -qa | grep mysql
    mysql-community-release-fc20-5.noarch

    The fc20-5 changes with point releases, but assuming that you’re installing the fc20-5 release:

    shell> sudo yum localinstall mysql-community-release-fc20-5.noarch
  • Install MySQL on Fedora
  •   [Read more...]
    How to install MySQL 10.0.6-MariaDB and to compile lib_mysqludf_preg on CentOS 6.4
    +0 Vote Up -0Vote Down

    In short, during an optimization or a MySQL query involving a lot of replace(replace(replace…))) I decided to compile PREG as lib_mysqludf_preg from UDF Repository for MySQL in a view to use PCRE functions directly in MySQL.

    Too bad MySQL still cant not use functions for index creation, but this is not the theme of this post.

    So, fist install MariaDB 10.0.6:
    set the MariaDB 10.0.6 repo, I used the ftp mirror at ftp.ulak.net.tr

    
    root@seik-centos-01:[Wed Dec 18 23:55:12][/tmp]$ cat /etc/yum.repos.d/MariaDB.repo 
    # MariaDB 10.0 CentOS repository list - created 2013-12-18 18:07 UTC
    # http://mariadb.org/mariadb/repositories/
    [mariadb]
    name = MariaDB
    #baseurl = http://yum.mariadb.org/10.0/centos6-amd64
    baseurl =

      [Read more...]
    Linux performance tuning tips for MySQL
    +0 Vote Up -0Vote Down

    Because most MySQL production systems probably run on Linux, I’ve decided to place the most important Linux tuning tips that will help improve MySQL performance. There is nothing new here, most of them are well known, however, I’ve decided to collect those Linux configuration tips into 1 blog post.

    Filesystem

    • ext4 (or xfs), mount with noatime
    • Scheduler – use deadline or noop

    # echo deadline >/sys/block/sda/queue/scheduler
    add "elevator=deadline" to grub.conf

    (For more info see Linux Schedulers in TPCC like benchmark)

    Memory

    • Swappiness and NUMA:

    # echo 0 > /proc/sys/vm/swappiness
    add "vm.swappiness = 0" to
      [Read more...]
    How to Enable MySQL Event Scheduler
    +0 Vote Up -0Vote Down

    You may think that you already know what's the opposite of "DISABLED", but with MySQL Event Scheduler you'll be wrong.

    In fact MySQL Event Scheduler may have three different states[1][2]:

    DISABLED -  The Event Scheduler thread does not run [1]. In addition, the Event Scheduler state cannot be changed at runtime.
    OFF (default) - The Event Scheduler thread does not run [1]. When the Event Scheduler is OFF it can be started by setting the value of event_scheduler to ON.
    ON - The Event Scheduler is started; the event scheduler thread runs and executes all scheduled events.
    

    So if you're going to find it in the DISABLED state and instinctively set it to ENABLED you'll end up with a non-starting MySQL daemon.
    Be warned and stay safe out there!


    [1]: http://dev.mysql.com/doc/refman/5.5/en/events-configuration.html
    [2]: When the Event Scheduler is not running does not appear in the output of SHOW PROCESSLIST
    How to store MySQL innobackupex backups at Google Cloud Storage
    +0 Vote Up -0Vote Down

    In general, I chose Google Cloud Storage to store web sites MySQL backups due to its price and speed of upload/download in real time

    I used the Google native tool – gsutil , innobackupex and some bash

    in short : the /etc and local MySQL  backup

    #!/bin/sh
    # Barcelona Tue Nov 22 17 16:30:36 CEST 2013
    
    days_to_keep=3
    NFS=/home/mysql.backups/
    exportDate=`date +%Y-%m-%d.%H.%M.%S`
    export_DIR=${NFS}/${HOSTNAME}.${exportDate}
    test ! -d "${export_DIR}" && echo "$(date) : creating ${export_DIR}" && mkdir -p
      [Read more...]
    Daily backup OpenStack single MySQL with Percona innobackupex including the /etc directory
    +0 Vote Up -0Vote Down

    this is a short script for daily backup of the OpenStack MySQL and the /etc direcotry of the control node

    [root@dev-epg-rhos-01 BACKUP]# cat /root/bin/epg.innobackupex.openstack.sh
    #!/bin/sh
    # done for epgmad4@tid.es
    # Barcelona Thu Oct 17 16:30:36 CEST 2013
    
    days_to_keep=7
    NFS=/BACKUP
    exportDate=`date +%Y-%m-%d.%H.%M.%S`
    export_DIR=${NFS}/${HOSTNAME}.${exportDate}
    test ! -d "${export_DIR}" && echo "$(date) : creating ${export_DIR}" && mkdir -p "${export_DIR}"
    export_MySQL_DIR=${export_DIR}/mysql.bckp
    export_ETC_DIR=${export_DIR}/etc.bckp
    rsync -avh /etc ${export_ETC_DIR}
    echo "=========================================================================================================" >> ${export_DIR}/README.restore.with.innobackupex
      [Read more...]
    Installing MySQL on Ubuntu and CentOS
    +0 Vote Up -0Vote Down
    MySQL is one of the most famous Open Source Relational Database Management System (RDBMS) created by Michael Widenius. Default choice in systems as WordPress and used by top companies as Google and Wikipedia. Due its simplicity and large community, it is largely used by developers and webmasters around the world. MySQL is under dual license: […]
    #DBHangOps 10/02/13 — MySQL Utilities, Resource Management, and more!
    +0 Vote Up -0Vote Down

    Thanks to everyone who came. Definitely check out the recording below!

    Heyo everybody!

    Coming up this Wednesday, October 2nd, 2013 at 12:00pm pacific (19:00 GMT) is another exciting #DBHangOps. Join the google hangout to discuss:

    • MySQL Utilities from Chuck Bell!
    • How do you constrain over-consumption of resources by competing applications?
    • Network vs. Local storage for MySQL
      • How do you use this for HA? Do you use DRBD or floating VIPs?
    • Secure connections to MySQL (using SSL) (requested by Daniel)
      • Do you have experience with this? What’s the performance impact?
    • PCI Certification with MySQL — what changed for you?
    • MySQL-isms!
      • (From Gerry) Sub SELECTs — Why aren’t these as

      [Read more...]
    OL 4 MySQL: Extending my VM’s root f/s online
    Employee +0 Vote Up -0Vote Down

    Ok, so after all the things that have been announced @MySQLConnect, I’ve got to play around with them. First stop: space (no.. not ‘the final frontier’).

    I need more space on my f/s to get installing. I was a bit of a scrooge when I created my Oracle Linux virtual machine, so now I’m paying the price.

    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/vg_ol63uek01-LogVol01
                          7.1G  5.7G  1.1G  85% /

    As I’m using Virtual Box, I’ve added a new SATA Controller vmdk of 10G, SATA Port 1 and then start it up.

    fdisk -l

    Will be able to identify the new & unused partition:

    [root@ol63uek01 ~]# fdisk -l
    Disk /dev/sda: 8589 MB, 8589934592 bytes
     255 heads, 63 sectors/track, 1044 cylinders
     Units = cylinders of
      [Read more...]
    OL 4 MySQL: Extending my VM’s root f/s online
    Employee +0 Vote Up -0Vote Down

    Ok, so after all the things that have been announced @MySQLConnect, I’ve got to play around with them. First stop: space (no.. not ‘the final frontier’).

    I need more space on my f/s to get installing. I was a bit of a scrooge when I created my Oracle Linux virtual machine, so now I’m paying the price.

    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/vg_ol63uek01-LogVol01
                          7.1G  5.7G  1.1G  85% /

    As I’m using Virtual Box, I’ve added a new SATA Controller vmdk of 10G, SATA Port 1 and then start it up.

    fdisk -l

    Will be able to identify the new & unused partition:

    [root@ol63uek01 ~]# fdisk -l
    Disk /dev/sda: 8589 MB, 8589934592 bytes
     255 heads, 63 sectors/track, 1044 cylinders
     Units = cylinders of
      [Read more...]
    Setting up WordPress on Debian/Ubuntu running Tengine web server
    +0 Vote Up -0Vote Down

    I will change my host provider within a month. I’ve been using Midphase for several years and have decided to use Linode as my next virtual private service provider. I will move this site there in the next few weeks. This will be my first time moving a domain and I hope the transfer will be smooth without too much down time. After all, I know my readers worldwide are hanging on to every word I type and deserve a site that runs 24 by 7

    Since I will have total control of this host, I decided to use Tengine, a great fork of the Nginx web/proxy server. Here is my note on how to compile and config Tengine on Debian/Ubuntu, and then setup WordPress. During my study and testing, the following sites are pretty

      [Read more...]
    #DBHangOps 9/17/13 — Data Warehousing, MySQL-isms, and MySQLConnect!
    +0 Vote Up -0Vote Down

    And that’s a wrap! Check out the recording:

    Hello!

    Coming up this Wednesday, September 18th, 2013 at 12:00pm pacific (19:00 GMT) come and join #DBHangOps to discuss:

    • Data warehousing in MySQL
      • Shipping large tables from production to your Data warehouse
      • Do you use Federated engine?
      • What other solutions do you use?
    • Answer some questions about MySQL-isms (requested by Tim Callaghan)
      • Why does MySQL have FRM files instead of storing them in a data dictionary table?
      • Why doesn’t InnoDB support other page sizes?
      • Why do we store data in a master.info file?
    • What are you excited to see at MySQLConnect?

    As always, take a


      [Read more...]
    Limit The Size of Your Core Files on Linux
    +1 Vote Up -0Vote Down

    So we all know that when troubleshooting MySQL crashes or any other processes in that regard, we simply enable core files to be dumped when the appropriate signal it triggered. To get the best results, we’d set the core file size limit everywhere to unlimited and be done with it, but what if you want to limit that to a certain size? I stumble to a small confusion lately when doing this for MySQL, so let me share quickly.

    First, for MySQL, mysqld_safe would use ulimit to set the core-file-size value you pass to it. Now remember according to the manual, this value should be in blocks (some documentation says its in chunks of 1024 bytes). However, according to my experience on CentOS 6, this is the physical block size of the device where your core_pattern is pointed to.

    [root@centos6 ~]# ulimit -a
    ...
    core file size          (blocks, -c) 0
      [Read more...]
    #DBHangOps 9/4/13 — Data dictionary corruption, MySQL Utilities, Benchmarking, and MySQLConnect!
    +0 Vote Up -0Vote Down

    Check out the video!
    Hey there everybody!

    Coming up this Wednesday, September 4th, 2013 at 12:00pm pacific (19:00 GMT) take part in #DBHangOps to discuss:


      [Read more...]
    Trick: recovering from "no space left on device" issues with MySQL
    +2 Vote Up -0Vote Down

    Just read Ronald Bradford's post on an unnecessary 3am (emergency) call. I sympathize! Running out of disk space makes for some weird MySQL behaviour, and in fact whenever I encounter weird behaviour I verify disk space.

    But here's a trick I've been using for years to avoid such cases and to be able to recover quickly. It helped me on such events as running out of disk space during ALTER TABLEs or avoiding purging of binary logs when slave is known to be under maintenance.

    Ronald suggested it -- just put a dummy file in your @@datadir! I like putting a 1GB dummy file: I typically copy+paste a 1GB binary log file and call it "placeholder.tmp". Then I forget all about it. My disk space

      [Read more...]
    #DBHangOps 8/21/13 — Fractal indexes in TokuDB and Schema tracking
    +0 Vote Up -0Vote Down

    Hey all!

    Coming up this Wednesday, August 21st, 2013 at 12:00pm pacific (19:00 GMT) join in to talk about:

    • Gerry from Tokutek to talk about B-Tree indexes in InnoDB and fractal indexes TokuDB!
    • Schema Versioning
      • How do you manage schema versions in your development pipeline?
      • How are your schema changes deployed? Is it automated?
      • Some automated schema management tools:
      [Read more...]
    Tool of the day: q
    +1 Vote Up -0Vote Down

    If you work with command line and know your SQL, q is a great tool to use:

    q allows you to query your text files or standard input with SQL. You can:

    SELECT c1, COUNT(*) FROM /home/shlomi/tmp/my_file.csv GROUP BY c1

    And you can:

    SELECT all.c2 FROM /tmp/all_engines.txt AS all LEFT JOIN /tmp/innodb_engines.txt AS inno USING (c1, c2) WHERE inno.c3 IS NULL

    And you can also combine with your favourite shell commands and tools:

    grep "my_term" /tmp/my_file.txt | q "SELECT c4 FROM - JOIN /home/shlomi/static.txt USING (c1)" | xargs touch

    Some of q's functionality (and indeed, SQL functionality) can be found in command line tools. You can use grep for pseudo

      [Read more...]
    Public DNS resolve for VM instances hosted at OpenStack nova compute grizzly edition
    +0 Vote Up -0Vote Down

    Issue – the OpenStack instances hostnames are not resolved at the moment by their floating IPs.

    Fast solution – use PowerDNS
    Short story:
    1. Boot an instance , assign it a floating IP, open tcp ports 22 8001 and udp port 53.
    2. Install PowerDNS, the particular yum package is named pdns.
    3. install the mysql backend for PowerDNS, its available as yum package as well.
    4. Install MariaDB , set the proper configuration, the initialize it at the default location.
    5. Set the pdns user, create the pdns database and create the tables needed.
    6. Configure the pdns service to use the gmysql backend.
    7. Create and user at the OpenStack MySQL able to connect from the floating IP subnet.
    8. Grant that user select permissions on all nova.* tables.
    9. At the PowerDNS









      [Read more...]
    #DBHangOps 7/24/13 — Innobackupex, schema migrations, and more!
    +1 Vote Up -0Vote Down

    And all set. Check out the recording:

    Hello everybody!

    Coming up this Wednesday, July 23rd, 2013 at 12:00pm pacific (19:00 GMT) join in to hear:

    • Brandon Johnson from Mozilla talk about an issue he recently worked through with XtraBackup and the process he took to identify and resolve the issues.

    And also take part in discussion around:

    • How do you apply production schema changes?
      • Do you use pt-online-schema-change?
        • Issues to watch out for
      • Just run the alter!
      • Pull from a pool and apply

    Make sure to follow the #DBHangops twitter search, the DBHangops Twitter Feed, or this blog post to get a link for the google hangout on Wednesday!

    Excited to see all of you joining in on the conversation!

    Previous 30 Newer Entries Showing entries 31 to 60 of 1137 Next 30 Older Entries

    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.