Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 10 of 33310 10 Older Entries
Why I moved my Joomla website to MariaDB
+0 Vote Up -0Vote Down
Wed, 2014-10-22 09:02svetoslavsavov

Next time you want to build a fast, well-optimized website, don't forget the database system. Many content management systems (CMS) let you choose a relational database management system (RDBMS) to use on the back end. MySQL, famous for its stability and security, is a popular choice; in addition to its numerous features, it has a large community, many contributors, and good documentation. However, MySQL is now owned by Oracle, and its future is not clear, which makes MariaDB, an application compatible database system, an excellent alternative.

Joomla, a popular CMS, is written in PHP and by default uses MySQL as its database system. Since MariaDB can provide improved functionality, performance, and stability, you might want to use MariaDB instead of MySQL with Joomla. Although MariaDB is not listed in

  [Read more...]
Pseudo GTID
+0 Vote Up -0Vote Down

Pseudo GTID is a method to implement a GTID-like solution where slaves are easily connected to one another. This blog post and the following ones will describe work in progress (some 80% completed), where simulation of GTID makes for a good enough basis for refactoring replication topologies. I'm coding this in orchestrator, which already provides a substantial infrastructure support for this.

The final goal: orchestrator will allow you to move a slave below another, using only the data available by those two slaves. The usage is obvious:

  • Easy master failover (master dead? Orchestrator will choose the most advanced slave to promote and make it master of its siblings)
  • Slave promotion in complex topologies (with
  [Read more...]
MariaDB 10.1.1: Compound statements
+0 Vote Up -0Vote Down

Every now and then there is a need to execute certain SQL statements conditionally. Easy, if you do it from your PHP (or Java or whatever) application. But if all you have is pure SQL? There are two techniques that MariaDB and MySQL use in the mysql_fix_privilege_tables.sql script (applied by mysql_upgrade tool).

  • Create a stored procedure with IF statements inside, call it once and drop it. This requires the user to have the CREATE ROUTINE privilege and mysql.proc table must exist and be usable (which is not necessarily true — we’re doing it from mysql_upgrade, right?).
  • Use dynamic SQL, like
    SET @str = IF (@have_csv = 'YES',
                   'CREATE TABLE IF NOT EXISTS general_log (
                      event_time TIMESTAMP(6) NOT NULL,
                      user_host MEDIUMTEXT NOT NULL,

  •   [Read more...]
    Percona XtraDB Cluster: How to run a 2-node cluster on a single server
    +0 Vote Up -0Vote Down
    I reckon there’s little sense in running 2 or more Percona XtraDB Cluster (PXC) nodes in a single physical server other than for educational and testing purposes – but doing so is still useful in those cases. The most popular way of achieving this seems to be with server virtualization, such as making use of Vagrant boxes. But in the same way you can have multiple instances of MySQL running in parallel on the OS level in the form of concurrent mysqld processes, so too can you have multiple Percona XtraDB Cluster nodes. And the way to achieve this is precisely the same: using dedicated datadirs and different ports for each node.

     

    Which ports?

      [Read more...]
    Improvements to the MySQL `IGNORE` Implementation
    Employee_Team +1 Vote Up -0Vote Down

    In 5.7.5, as a part of the larger effort to improve error handling, we re-implemented the IGNORE clause (WL#6614). The IGNORE clause is a MySQL extension to the SQL standard. It affects the errors which occur for each row. The new implementation aims to make the behavior of the IGNORE clause more consistent.

    Statements which support the IGNORE clause are:

    • INSERT [ IGNORE ]
    • UPDATE [ IGNORE ]
    • DELETE [ IGNORE ]
    • LOAD DATA [ IGNORE ]
    • LOAD XML [ IGNORE ]
    • CREATE TABLE… [ IGNORE ] SELECT

    When the INSERT statement is used to insert a number of rows into a table, an exception during processing would normally abort the statement and return an error message. With the IGNORE keyword, rows that cause certain exceptions are ignored,

      [Read more...]
    XFS and EXT4 Testing Redux
    +0 Vote Up -0Vote Down

    In my concluded testing post, I declared EXT4 my winner vs XFS for my scenario. My coworker, @keyurdg, was unwilling to let XFS lose out and made a few observations:

    • XFS wasn’t *really* being formatted optimally for the RAID stripe size
    • XFS wasn’t being mounted with the inode64 option which means that all of the inodes are kept in the first 2TB. (Side note: inode64 option is default in newer kernels but not on CentOS 6’s 2.6.32)
    • Single threaded testing isn’t entirely accurate
      [Read more...]
    MySQL: The most popular open source database for WWW
    Employee +1 Vote Up -0Vote Down

    (Note : This an Article from last year when MySQL5.6 was released)

    While Database technology is one of the oldest branches of computer science, it remains a fundamental computer technology that continues to attract new research. The current focus of Databases technology is towards adapting hot new tends like multi-core chips, solid state devices, NOSQL and Cloud. So what does a contemporary internet developer look for in a database for the internet era? And why does MySQL remain the most popular database for the web?

     

    For a database to be useful while developing products for the Web, the most important requirements are that it should be quick and easy to download, quick to set up, powerful enough to get the job done, be fast and flexible to use and finally be scalable on the newest hardware. Compatibility with

      [Read more...]
    High Performance Drupal with MariaDB
    +0 Vote Up -0Vote Down
    Mon, 2014-10-20 09:31maria-luisaraviol

    I am back from 2014 Amsterdam Drupalcon where MariaDB Corporation was present as sponsor. It was my first time there and I must say I was really impressed by the amount of people attending the conference (around 2300 people) and the interest that the people showed for MariaDB.

    We had many conversations with several kind of engineers, developers, providers and just for a few of them MariaDB was something new to discover; the great majority of them either were already using it or were planning to do it but they did not manage to find some “free” time to do it yet.

    What impressed me, was that almost all of the MariaDB happy users just replaced their previous database server installation (MySQL or Percona) with

      [Read more...]
    MariaDB 10.1.1: no more .frm’s for performance_schema tables
    +0 Vote Up -0Vote Down

    Yes! In MariaDB 10.1.1 tables in PERFORMANCE_SCHEMA do not use .frm files. These files are not created, not read — in fact, PERFORMANCE_SCHEMA tables never touch the disk at all.

    This became possible due to a lesser-known feature of MariaDB — new table discovery (“old table discovery” was implemented in MySQL for NDB Cluster in 2004), implemented in MariaDB 10.0.2. Instead of reading and parsing .frm files, MariaDB simply asks PERFORMANCE_SCHEMA table, what structure it has, and because these tables always have a fixed structure, the table directly returns it to MariaDB with no need for any external data dictionary.

    It also means, you never need to upgrade PERFORMANCE_SCHEMA tables, they

      [Read more...]
    Making UUID() and RAND() replication safe
    +1 Vote Up -0Vote Down

    MySQL's UUID() and RAND() functions both provide with (pseudo) indeterministic result. UUID()'s result is moreover bound to the host on which it executes. For this reason, both are unsafe to replicate with STATEMENT binlog format. As an example, consider:

    master> create table test.uuid_test (id int, u varchar(64));
    
    master> insert into test.uuid_test values (1, UUID());
    Query OK, 1 row affected, 1 warning (0.03 sec)
    
    master> select * from test.uuid_test;
    +------+--------------------------------------+
    | id   |
      [Read more...]
    Showing entries 1 to 10 of 33310 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.