The Information Systems and Computer Applications examination covers material that is usually taught in an introductory college-level business information systems course.

Posts tagged “MySQL

Aside

Thoughts on Xeround and Free! by Mike Hogan

Everybody loves free. It is the best marketing term one could use. Once you say “FREE” the people come running. Free makes you very popular. Whether you are a politician offering something for free, or a company providing free stuff, you gain instant popularity.

Xeround is shutting down their MySQL Database as a Service (DBaaS) because their free instances, while popular, simply did not convert into sufficient paid instances to support the company. While I am sad to see them fail, because I appreciate the hard work required to deliver database technology, this announcement was not unexpected.
My company was at Percona Live, the MySQL conference, and I had some additional conversations along these same lines. One previously closed source company announced that they were open sourcing their code, it was a very popular announcement. A keynote speaker mentioned it and the crowd clapped excitedly. Was it because they couldn’t wait to edit the code? Probably not. Was it because now the code would evolve faster? Probably not, since it is very low-level and niche oriented, and there will be few committers. No, I think it was the excitement of “free”. The company was excited about a 49X increase in web traffic, but had no idea what the impact would be on actual revenues.
I spoke with another company, also a low-level and niche product, and they have been open source from the start. I asked about their revenues, they are essentially non-existent. Bottom line is that the plan was for them to make money on services…well Percona, Pythian, SkySQL and others have the customer relationships and they scoop up all of the consulting and support revenue while this company makes bupkis. I feel for them.
I had a friend tell me that ScaleDB should open source our code to get more customers. Yes open source gets you a lot of free users…not customers. It is a hard path to sell your first 10…25…50…etc. customers, but the revenue from those customers fuels additional development and makes you a fountain of technology. Open source and free are great for getting big quickly and getting acquired, but it seems that if the acquisition doesn’t happen, then you can quickly run out of money using this model (see Xeround).
I realize that this is an unpopular position. I realize that everybody loves free. I realize that open source has additional advantages (no lock-in, rapid development, etc.), but in my opinion, open source works in only two scenarios: (1) where the absolute volume is huge, creating a funnel for conversion (e.g. Linux); (2) where you need to unseat an entrenched competitor and you have other sources of revenue (e.g. OpenStack).
I look forward to your comments. We also look forward to working with Xeround customers who are looking for another solution.

Cambio en los Senconds_Behind_Master en MySQL 5.6 by Jordi Prats

En los cambios de MySQL 5.5 a MySQL 5.6 podemos encontrar el siguiente comentario que puede sonar raro:

Important Change: Replication: Formerly, the value of the Seconds_Behind_Master column in the output of SHOW SLAVE STATUS was always set to NULL whenever the SQL thread or the I/O thread was stopped. Now, this column is set to NULL only if the SQL thread is not running, or if the I/O thread is not running following a check to determine whether or not the SQL thread has processed all of the relay log. (If the SQL thread has finished processing and the I/O thread is running, Seconds_Behind_Master is 0.) (Bug #12946333)

Suena raro que se diferencie entre “stopped” y “not running”, pero tiene su explicación.

 

Podemos encontrarnos que los Seconds_Behind_Master vayan creciendo linealmente:

SBM creciendo linealmenteSBM creciendo linealmente

Revisando los logs nos encontraremos con el siguiente error:

121122 17:20:41 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL
thread with "SLAVE START". We stopped at log 'binlog.000050' position 877769220

Lo que esta pasando es que por el bug anteriormente comentado (#12946333) el thread esta corriendo pero no esta actualizando, por lo que como que no esta “stopped” el Seconds_Behind_Master no esta a NULL.

Por lo que lo que nos encontramos en versiones de MySQL 5.5 y anteriores es que aparece un error en los camposLast_Error y Last_Errno. Por suerte no ocurre con todos los errores de replicación sino algunos.

Por lo tanto, para comprobar si se ha roto la replicación en MySQL 5.5 en lugar de mirar si elSeconds_Behind_Master esta a NULL, deberemos mirar si el Last_Errno no esta a 0

Tags: 

Relacionados

 

Enhanced by Zemanta

Ficheros temporales de MySQL by Jordi Prats

En MySQL existe la directiva tmpdir que indicamos el directorio que debe usar para crear ficheros temporales. Aún así, existen otros ficheros temporales que no se crean el dicho directorio.

 

Si definimos la directiva tmpdir veremos que allí crea ficheros con los datos de queries que no le caben en memoria (HEAP) y hace la operación (por ejemplo un sort) en disco:

# grep tmp /etc/my.cnf
tmpdir				= /var/mysql/tmp
# ls /var/mysql/tmp
#sql_22c8_0.MYD  #sql_22c8_0.MYI  #sql_22c8_1.MYD  #sql_22c8_1.MYI

Pero en el datadir también podemos ver en alguna ocasión ficheros temporales que ignoran la directiva tmpdir. En el caso de MyISAM ficheros TMM:

-rw-rw---- 1 mysql mysql 7684096 Nov 16 08:56 xbt_announce_log#P#p48.MYI
-rw-rw---- 1 mysql mysql    1024 Nov 16 08:56 xbt_announce_log#P#p52.TMM
-rw-rw---- 1 mysql mysql 7733248 Nov 16 08:56 xbt_announce_log#P#p51.MYI
-rw-rw---- 1 mysql mysql 7702528 Nov 16 08:56 xbt_announce_log#P#p50.MYI

O en el caso de InnoDB se forman con un identificador de la query:

-rw-rw---- 1 mysql mysql      13632 Nov 16 08:59 #sql-4731_a5b2.frm
-rw-rw---- 1 mysql mysql   28311552 Nov 16 08:59 #sql-4731_a5b2.ibd

Estos ficheros temporales en el datadir se producen cuando realizamos un OPTIMIZE sobre la tabla. Se tratan de ficheros temporales muy diferentes de los que nos referimos con la directiva tmpdir.

Con tmpdir indicamos los ficheros que corresponden a operaciones con los datos. Mientras que los ficheros temporales que se crean en el datadir son las propias tablas que se están recreando.

Tags: 

Relacionados

 

Enhanced by Zemanta

Honeypot con Kippo – II by Alejandro Ramos

Una vez Kippo lleva registrando datos de incautos script-kiddies que lanzan sus herramientas de fuerza bruta contra todo Internet, es hora de ver esa información y explotarla.

Para ese propósito existen herramientas externas como Kippo-Graph , actualmente en su versión 0.7.2, que por cierto, tiene un XSS , que espero solucionen pronto.

Es necesario disponer de un sistema con PHP y MySQL sobre el que ejecutar la aplicación. El php ha de tener soporte para la librería de gráficos GD (php-gd) y el propio módulo para conectar a MySQL (php-myslq).

Lo primero es descargar el código, descomprimirlo allí donde se vaya a instalar y cambiar los permisos a la carpeta donde se crean las gráficas.

 

Lo siguiente es configurar el archivo config.php acorde al usuario y contraseña creado en la base de datos del MySQL.

Una vez hecho, se accede al directorio vía web del tipo http://ip/kippo-graph, y desde la página principal se generan las imágenes. El código no es demasiado bueno y la generación de gráficos no es en tiempo real.
Si queréis parchear el XSS, tan solo hay que anteponer la función htmlentities() en las llamadas a $row[‘input’]. Para que queden las líneas de la forma: htmlentities($row[‘input’])

La aplicación genera unos resultados bastante llamativos, como se muestran en las siguientes capturas:

 

 

Enhanced by Zemanta