http://www.hersoncruz.com

  • Increase font size
  • Default font size
  • Decrease font size

Web development

Joomla, Drupal, Compiere, TinyERP, vtigerCRM, Openbravo, GLPI, OOZ Your company must be open to the power of Internet and provide your customer and employees with tools to integrate work and communications,

#000000

Linux Servers

Samba, Bind9, DHCP, Apache, OpenSSH, Apache, OpenLDAP, Squid Free software has many users on corporate market. I provide quality solutions for all your needs in servers technology. Free software brings you

#000000

Security

Firewall, FreeBSD, Bastille, Tripwire, IPCop, Untangle, E-Box Give us the oportunity to protect your network against Internet threats with the most efficient software ever created. We implement firewalls, DMZ zones, network

#000000
http://www.hersoncruz.com/components/com_gk2_photoslide/images/thumbm/2811300001.jpg
http://www.hersoncruz.com/components/com_gk2_photoslide/images/thumbm/2332880003.jpg
http://www.hersoncruz.com/components/com_gk2_photoslide/images/thumbm/2313660002.jpg
thumbnailthumbnailthumbnail
Home News Feeds Planet MySQL
Newsfeeds
Planet MySQL
Planet MySQL - http://www.planetmysql.org/

  • Announcing the SkySQL & MariaDB Solutions Day for the MySQL® Database: Free Training for Developers, DBAs, & IT Architects
    SkySQL and MariaDB are delighted to announce that we’ll be co-hosting our first Solutions Day for the MySQL® Database on 13 April, 2012, at the Hyatt Regency Santa Clara. During this one day event, attendees will receive free, hands-on training on MySQL database solutions from the experts at SkySQL, MariaDB, Continuent, ScaleDB, Severalnines, Sphinx, and Webyog, among others. As well, SkySQL and MariaDB will bring together industry visionaries, including Michael (Monty) Widenius and David Axmark, the original authors of the MySQL database, to share their insights on current and future trends pertaining to the world’s most popular open source database. Register Now! Benefits of Attending: Obtain free training and hands-on experience that will help you optimize, scale, and enhance your MySQL database deployments Learn how to integrate your applications with popular MySQL solutions from Sphinx, ScaleDB, among others Learn how to create a high availability (HA) environment for your MySQL databases using the latest HA solutions Gain valuable insights into how to adapt your MySQL solutions to the Cloud Hear from industry leaders about current and future trends surrounding the MySQL database and technology ecosystem Network with and learn from your peers in the MySQL Community Who Should Attend: MySQL Database Administrators Application Developers building solutions on MySQL Development/Engineering Management IT Architects Cost of Attending: The SkySQL & MariaDB: Solutions Day for the MySQL Database – featuring keynotes from industry visionaries, six intensive tutorials, and lunch – is absolutely free to attendees. To learn more, take a look at our event schedule, featured speakers, the venue.  As well, follow our discussions on Twitter @skysql #mysqlday, and on Facebook. Register Now!  

  • LOAD DATA INFILE to resolve locks
    In relation to this MPB post, there is a command to output data into a file and then to load it back into MySQL to resolve locks. (An example of a really big reporting query that could be quite heavy, can be found here.) There is an issue with outputting data into a file through MySQL if the file already exists. For example: mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select * from user into outfile '/tmp/user.sql'; Query OK, 10 rows affected (0.00 sec) mysql> select * from user into outfile '/tmp/user.sql'; ERROR 1086 (HY000): File '/tmp/user.sql' already exists So to resolve this, I played around with the \! command (which lets you run commands on your OS): mysql> \! rm -rf /tmp/user.sql mysql> select * from user into outfile '/tmp/user.sql'; Query OK, 10 rows affected (0.00 sec) mysql> \! rm -rf /tmp/user.sql mysql> select * from user into outfile '/tmp/user.sql'; Query OK, 10 rows affected (0.00 sec)This seemed to have worked. Apart from security issues and OS specific commands, anyone see anything wrong with this approach?Perhaps I should wrap it around in a stored procedure..

  • Meet The MySQL Experts Podcast: MySQL & PHP
    The latest episode of our “Meet The MySQL Experts” podcast focuses on MySQL & PHP! Andrey Hristov and Johannes Schlüter from the MySQL Connectors Team talk about various ways PHP developers can use MySQL, and also how they can leverage the MySQL Query Analyzer to optimize queries. Enjoy the podcast! For additional information about MySQL & PHP, check out our last special edition newsletter.

  • Announcing Percona Toolkit Release 2.0.3
    We’ve released Percona Toolkit 2.0.3, with a couple of major improvements and many minor ones. You can download it, read the documentation, and get support for it. What’s new? You can read the changelog for the details, but here are the highlights: Brand new pt-diskstats, thanks to Brian Fraser. This tool is completely rewritten, and it’s finally the iostat replacement I always wanted. Not only does it have the functionality I want (interactive, slice and dice, smart defaults) but it has the detailed statistics on I/O, so you can see whether your reads are slow versus your writes, and whether things are waiting on the disk or waiting on the queue scheduler (cfq, hint hint). Finally, it has transparency, so you can read the documentation and understand, really, what it’s doing at the low level and what that means for your server. We really need specific, precise information on exactly how the I/O is behaving so we can make good decisions when there are problems or when doing things like capacity planning. Brand new pt-stalk, courtesy of Daniel Nichter. This tool is also completely rewritten. Instead of a Bash script that you have to configure with environment variables and run in a screen session, this is now a first-class fault detection daemon. Everyone needs post-mortem forensic data when there is a problem, and pt-stalk aims to be a core part of your infrastructure that fills this gap. It now supports things a “real” Percona Toolkit tool ought to have, such as command-line options and a configuration file. In addition, we merged pt-collect into it, so as of Percona Toolkit 2.0.3, there isn’t a separate pt-collect tool anymore. There’s a lot more to this release, but those are the major points. Download it and let us know how it works, please! If you find bugs, file them on Launchpad, and if you need support, you know where to get it.

  • SpyMemcached Transcoder with PHP PDO Objects using ZLIB
    My technology stack services more then 2 Million Daily Active users.  Its very basic. PHP talks to mySQL, Memcache, RabbitMQ, Gearman and Facebook.  Now that we have more Java specifically to support our SmartFox Server and other services, blurring the lines between what data is set in PHP and what data is read in Java is very necessary.Java J-Connect makes reading mySQL Data as simple IMHO as PHP's PDO. What is hard is reading PHP's serialized format from PHP's Memcache library.In PHP there are two main C backed Libraries. There is Memcache the original PHP library which I happen to use, and Memcached which is the library I wanted to use but didn't deploy since EC2 package system conflicted and cause issues (I fixed them but to late to deploy). Memcache stores data in PHP's serialized format and compresses it via ZLIB, while Memcached can store data as PHP's serialized format, JSON, Binary Serialized (which is rather awesome), JSON Array Notation and has a multitude of compressing formats none of which are pure ZLIB that I noticed.Here is the problem. Spymemcached is a lib for talking to memcache but can't unserialized PHP serialized format (or read it natively and return a string) and cannot Decompress ZLIB but can Decompress GZIP. Now a great speed up would be to use PHP's serialized data set from PHP and share memcache resources from PHP and Java just like what is done for the mySQL resources.What needs to be done? Well, build your own Transcoder for Spymemcached. Fortunately Spymemcached documented an interface to do just that.What is needed. Implement the spymemcached Interface defined here. Use org.lorecraft.phparser to unserialize PHP data  defined here. Return the Object. Below is the code.package com.schoolfeed.spymemcached;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.util.zip.InflaterInputStream;import net.spy.memcached.CachedData;import net.spy.memcached.compat.CloseUtil;import net.spy.memcached.transcoders.BaseSerializingTranscoder;import net.spy.memcached.transcoders.Transcoder;import org.lorecraft.phparser.*;public class PHPSerializedTranscoder extends BaseSerializingTranscoder implements Transcoder <Object> { static final int COMPRESSED=2; /** * Get a serializing transcoder with the default max data size. */ public PHPSerializedTranscoder() { this(CachedData.MAX_SIZE); } /** * Get a serializing transcoder that specifies the max data size. */ public PHPSerializedTranscoder(int max) { super(max); } /** * decode the byte data from Memcache decompress it if necessary and return the Object * @param CacheData - the byte data is turned into a object * @returns Object */ public Object decode(CachedData d){ byte[] data=d.getData(); Object rv=null; String ds="N;"; if((d.getFlags() & COMPRESSED) != 0) { getLogger().debug("Looks like d is compressed"); data=decompress(d.getData()); } ds=decodeString(data); getLogger().debug("DECODED: [" + ds + "] about to SerializedPhpParser"); SerializedPhpParser sp = new SerializedPhpParser(ds); try { rv = sp.parse(); getLogger().debug("Parse was cool!!"); } catch(Exception e){ getLogger().debug("Not a PHP Object? : " + ds); rv = ds; } return rv; } /** * PHP Memcache stores compress data in ZLIB format override the base class decompress method to handle ZLIB * * @param byte array - raw data from Memcache * @returns byte array */ protected byte[] decompress(byte[] in) { ByteArrayOutputStream bos=null; final int BUFFER = 2048; if(in != null) { ByteArrayInputStream bis=new ByteArrayInputStream(in); bos=new ByteArrayOutputStream(); InflaterInputStream iis = null; try { iis = new InflaterInputStream(bis); byte[] buf=new byte[BUFFER]; int r=-1; while((r=iis.read(buf, 0, BUFFER)) > 0) { bos.write(buf, 0, r); } } catch (IOException e) { getLogger().warn("Failed to decompress data", e); bos = null; } finally { CloseUtil.close(iis); CloseUtil.close(bis); CloseUtil.close(bos); } } return bos == null ? null : bos.toByteArray(); } /** * encode -- not implemented yet * */ public CachedData encode(Object o){ int flags = 0; byte[] b=null; return new CachedData(flags, b, getMaxSize()); } /** * no need to async Decode let's do it realtime */ public boolean asyncDecode(CachedData d) { return false; }}This is a stop-gap solution until we make the transition to Memcached with JSON encoding. Then I can use Jackson-JSON - which is a fast JSON encoder/decoder for Java enabling a great portable message protocol between the two stacks and nearly any other language we might add to the system (like Python).


Newsflash

Free and open source software, also F/OSS, FOSS, or FLOSS (for Free/Libre/Open Source Software) is software which is liberally licensed to grant the right of users to study, change, and improve its design through the availability of its source code. This approach has gained both momentum and acceptance as the potential benefits have been increasingly recognized by both individuals and corporate players.