Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
10 Newer Entries Showing entries 31 to 40 of 33481 10 Older Entries
Optimizing MySQL for Zabbix
+0 Vote Up -0Vote Down


This blog post was inspired by my visit at the annual Zabbix Conference in Riga, Latvia this year, where I gave a couple of talks on MySQL and beyond.

It was a two day single-track event with some 200 participants, a number of interesting talks on Zabbix (and related technologies) and really well-organized evening activities. I was amazed how well organized the event …


  [Read more...]
How to connect Python programs to MariaDB
+0 Vote Up -0Vote Down

Fri, 2014-11-14 08:30anatoliydimitrov

You can use the popular programming language Python to manage data stored in MariaDB. Here is everything you need to know about connecting to MariaDB from Python for retrieving, updating, and inserting information.

Preparation and installation

If you don't already have MariaDB installed on your system, check the official MariaDB installation instructions or read the blog post on …

  [Read more...]
How to connect Python programs to MariaDB
+0 Vote Up -0Vote Down

Fri, 2014-11-14 08:30anatoliydimitrov

You can use the popular programming language Python to manage data stored in MariaDB. Here is everything you need to know about connecting to MariaDB from Python for retrieving, updating, and inserting information.

Preparation and installation

If you don't already have MariaDB installed on your system, check the official MariaDB installation instructions or read the blog post on How …

  [Read more...]
DbCharmer Development: I Give Up
+0 Vote Up -0Vote Down

About 6 years ago (feels like an eternity in Rails world) working at Scribd I’ve started working on porting our codebase from some old version or Rails to a slightly newer one. That’s when I realized, that there wasn’t a ruby gem to help us manage MySQL connections for our vertically sharded databases (different models on different servers). I’ve started hacking on some code to replace whatever we were using back then, finished the first version of the migration branch and then decided to open the code for other people to use. That’s how the DbCharmer ruby gem was born.

For the next few years a lot of new functionality we needed has been added to the …

  [Read more...]
C bitfields considered harmful
+0 Vote Up -0Vote Down

In C (and C++) you can specify that a variable should take a specific number of bits of storage by doing “uint32_t foo:4;” rather than just “uint32_t foo”. In this example, the former uses 4 bits while the latter uses 32bits. This can be useful to pack many bit fields together.

Or, that’s what they’d like you to think.

In reality, the C spec allows the compiler to do just about anything it wants with these bitfields – which usually means it’s something you didn’t expect.

For a start, in a struct -e.g. “struct foo { uint32_t foo:4; uint32_t blah; uint32_t blergh:20; }” the …

  [Read more...]
Percona Live London 2014 Wrap Up
+1 Vote Up -0Vote Down

The 2014 edition of Percona Live London brought together attendees from 30 countries to hear insightful talks from leaders in the MySQL community. The conference kicked off on Monday with a full day of tutorials followed by the very popular Community Dinner featuring a double decker bus shuttle from the conference to the event.

Tuesday started with keynote talks by representatives from MySQL, VMware, HGST, Codership, and Percona. I particularly enjoyed the talks by Tomas Ulin of MySQL (which highlighted the upcoming …

  [Read more...]
mysqlcheck
+0 Vote Up -1Vote Down

Useful utility to check, repair, analyze and optimize mysql tables.  Just be aware that it locks the table, so don't run on busy production tables if they are clustered as probe may time out.

 

mysqlcheck --auto-repair --all-databases –uroot

Extracting a database from any mysqldump file
+0 Vote Up -0Vote Down

Eg to extract the database OPALGATEWAY  from the dump file all-06-11-11-17:00-mk-staging-1.sql.gz  .

 

 

zcat all-06-11-11-17:00-mk-staging-1.sql.gz | awk '{ if ( $0 ~ /CREATE DATABASE.*OPALGATEWAY.*/ ) a=1; if ( $0 ~ /CREATE DATABASE / && $0 !~ /CREATE DATABASE.*OPALGATEWAY.*/ ) a=0;  if (a==1) print $0 }' | gzip -  | cat - >  /tmp/OPALGATEWAY.sql.gz

Set up slow query log
+0 Vote Up -1Vote Down

slow_query_log       = 1

slow_query_log_file  = /ebill-slave-1/mysql-logs/mysqld-slow.log

long_query_time      = 6000

log-queries-not-using-indexes

log-slow-admin-statements

 

max_connections=13000

 

..and

 

cd mk-myacct-dbslave-2/ebill-slave-2/mysql-logs >

 

 

touch mysqld-slow.log

 

chown mysql:mysql mysqld-slow.log

 

chmod 755 mysqld-slow.log

 

Got a packet bigger than 'max_allowed_packet' bytes
+0 Vote Up -1Vote Down

mysql> show slave status\G

*************************** 1. row ***************************

               Slave_IO_State:

                  Master_Host: mk-mysqlcluster-2-miscdb-rw.uk.intranet

                  Master_User: replusr_miscdb

                  Master_Port: 3306

…  [Read more...]
10 Newer Entries Showing entries 31 to 40 of 33481 10 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.