MySQL

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.

This group mission is to address MySQL related issues in Drupal modules development process or discuss efficient use of MySQL within Drupal based projects.

Abeaudrian's picture

Shared Database Tables In a single database - How to import records

Hi All

I am creating a website which has a number of different companies which share the same cck fields in the database. However I would like to know how I can import records from a csv file into the database since they are some shared tables / cells involved. Can this be done?

Please advise.

Regards

Adrian

Read more
shantanuo's picture

A query in the loop

Hi,
There is this query in a loop for every logged in user.

SELECT dst FROM dp_url_alias WHERE src = 'user/62025'

It is consuming a lot of MySQL resources and slowing down the site. Is it the standard query? What does it do? What should I do to stop it or increase the interval?

Read more
ghayoumi's picture

Slow query from statistics table

I have drupal website with ~500,000 nodes and I have problem with this query:

SELECT node.nid nid
FROM node FORCE INDEX(node_created), term_node, node_counter
WHERE node.nid = term_node.nid
AND term_node.nid = node_counter.nid
AND node.created > 1244565947
AND tid =170
AND node.nid NOT IN (218892)
AND node.status=1
AND type = 'akhbar'
ORDER BY node_counter.totalcount DESC LIMIT 0 , 4

Can anyone help ?

if I don't use "FORCE INDEX(node_created)" the query is 10 times slower.

Read more
athoune's picture

Make a clean snapshot of a drupal website, files and databases

The classical mysqldump is not enough to backup a drupal website.

With Snapshot, you can freeze your website and make a clean snapshot, mysql data and files. Different backup type can be done, simple copy, rsync and even rdiff-backup wich provide differential backup.

For now, only myIsam tables can be backuped. I follow percona work to handle innodb soon. Postgres must not be hard to handle.

For now, backup is local. Soon, distant copy will be handled with rsync, ftp and even S3.

Beta version is on github : http://github.com/athoune/Drupal-Snapshot/tree/master

Read more
bflora's picture

Optimizing iowait with tmpdir and tmpfs or ramfs for Drupal 5 site

A note from the developer who oversees one of my Drupal sites. We could use your help.

Hello,

I have a rather burly Drupal based site that seems to be causing some
problems, today we had a major outage. There are many slow queries
and also mysql related iowait that causes server processes to hang, at
least that is the theory.

Here you can examine some of the stats on the server:
http://andric.us/load/localdomain/localhost.localdomain.html

You can see my iowait stats here, which are pretty high:
http://andric.us/load/localdomain/localhost.localdomain-cpu.html

Read more
Swampcritter's picture

Drupal & MySQL 5.x Cluster

I setup a MySQL 5.0 Cluster on a spare server with multiple Xen VMs and discovered that Drupal 6 (and most likely D7 as wel) as it exists today cannot function properly under the MySQL NDBCLUSTER engine. It seems that under the NDBCLUSTER engine (also known as NDB), D6 has a table called menu_router that fails to be converted.

I posted a bug report about it under the D6 platform as it is rather detailed, but I have an idea this will affect D7 as well.
http://drupal.org/node/391130

Read more
gnanasekar's picture

How to change my 5.x module to 6.x

Hi,

Currenty i upgrade my version 5.9 to 6.2. What r the changes in my own module for drupal 6.7. What is the difference between 6.2 to 6.5. If u know any document recommend to me.

thanks & regards,
Gnanasekar Boju

Read more
markus_petrux's picture

Anyone tried Percona XtraDB Storage Engine for MySQL?

Reading the MySQL Performance Blog I've found that they have released a new storage engine that's based on InnoDB with a few performance additions. I thought it could be of interest to some of you.

Here's a few links about it:

<

ul>

  • Announcing Percona XtraDB Storage Engine: a Drop-in Replacement for Standard InnoDB (2008/12/16)
  • Read more
    ghayoumi's picture

    Vertical Partitioning for nodes table

    We have a website and we want to migrate to drupal. I have never build a website with drupal before. we might have 200,000-300,000 new pages in {nodes}.body each month. for the current website we had to denormalize database and call a second query to select the longText field and we had a significant performance gain. Can we somehow denormalize the nodes table and separate the body field. what do u think ?
    you can also check this address to see an example of vertical partitioning performance gain.

    Read more
    Shyamala's picture

    Drupal newspaper site

    We are launching a newspaper website in the next couple of days. The site is in Drupal. Can any comments on the ini settings? Does the server conf enough for the load shown.

    The site has to serve:
    Number of visits 35,720
    Pages 205,129
    Hits 1929,027

    The server configuration:
    Processor: Quadcore 2.66 ghz * 2
    Ram: 8GB
    Harddisk: 146Gb * 5

    My.ini configuration:
    [mysqld]
    datadir=/Drive1/database
    socket=/var/lib/mysql/mysql.sock
    set-variable = max_allowed_packet=64M
    set-variable=max_connections=1000
    log-bin = /Drive1/database/mysql-bin.log
    binlog-do-db=cab
    server-id=1

    Read more
    Swampcritter's picture

    Split MySQL DB read/write for Drupal 5

    I am the back-end engineer/architect working on consolidating a number of production web sites using Drupal 5.11 with the Drupal Memcache API as a base along with the multi-site configuration.

    Here's the architecture so far...
    - 2-node load balancer front-end (2 Cisco ASA 5510s)
    - 4-node web/app servers: RHEL 5 + GFS + Drupal Memcache API + Memcached (Quad Xeon, 8GB Ram each)
    - 1-node MySQL 5.x database server with two other MySQL servers in hot stand-by mode (Quad Xeon, 16GB Ram each)
    - EMC SAN Storage (1.5TB allocated)

    Read more
    aerozekiel's picture

    I Can't grab it to populate my smsu database

    when I execute this command: mysql -u root smsu < /usr/share/doc/gnokii-smsd-mysql/sms.tables.mysql.sql

    I'm getting "dlopen error: /usr/lib/smsd/libmysql.so: cannot open shared object file: no such file or directory!"

    I tried to fix it by issuing this command: "ln -s /usr/share/smsd /usr/lib/smsd"

    But still didn't work.

    Please help and thanks in advance.

    Read more
    shanefjordan's picture

    Site Crashes with multiple refreshes

    We are running RHEL5.1, Apache2, MySql5, PHP5 and have run into an issue. Our site runs find with normal usage, but if you hold the refresh (F5) key, then the site will crash. We have gotten it to the point that it will not crash the server, but it will take a while before the page responds (for any user). I know that this does not happen on other sites, so we are most likely missing a configuration setting somewhere. Here is what we have:

    Apache

    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 2
    StartServers 8
    MinSpareServers 5
    MaxSpareServers 20

    Read more
    Amazon's picture

    Proposal for MySQL conference April 20-23, 2009 Santa Clara, CA, USA

    http://en.oreilly.com/mysql2009/public/cfp/38

    Drupal and MySQL go together well. It would be great to have some Drupal presentations and not just a Drupal booth this year at MySQL Expo.

    Kieran

    Read more
    Shyamala's picture

    Drupal and connection pooling

    Does Drupal support connection pooling,
    transaction control,
    connect and disconnect connections??

    Any thoughts on:
    http://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connec...

    Read more
    binutz's picture

    Can I share or import data from another (Drupal) site to my current site and then export back?

    I would like to know whether it is possible to import customer profiles from an external MYSQL database (ie, from another drupal site hosted on a different server) to my current drupal site to be used for running my applications and then export them back with some profile modifications?

    I would like to keep the main database site separate from my application site and run it with only necessary data fetched from the main database. Will this system work? Is it something complicated to administer?

    Read more
    Shyamala's picture

    InnoDb in Drupal

    How do you convert a MyIsam table to Innodb tables in Drupal? Though we have carried out the configuration changes, the changes have not taken effect.

    Shyamala

    Read more
    Shyamala's picture

    MY SQL configuration

    We have a database Server Configuration:
    4GB RAM
    600GB Hard Disk
    Xeon Processor 1.3 Ghz.

    We are barely able to have 100 concurrent users!!! What are we doing wrong.

    I know I need to configure mysql_query cache, mysql_limit_size and table_cache. But what should be the formula, and how do we go about checking the same.

    Below is the details of our my.ini file.

    [mysqld]
    datadir=/database/data
    socket=/var/lib/mysql/mysql.sock
    set-variable=max_connections=2000
    set-variable = max_allowed_packet=64M
    default-storage-engine = innodb
    log-bin=/database/data/mysql-bin

    Read more
    Shyamala's picture

    Benchmarking in Drupal

    Drupal and MySQl located in two different servers:

    Configuration: Drupal server: Dual core processor, 4GB RAM
    MySQL Server: Xeon Processor, 4GB RAM

    MySQL Enterprise edition 5

    In an exercise to Pre populate the database with 1 million records, record insertions in the tables are very slow since the requests are getting queued up in the database. Insertion is done using a special tool that records our drupal application and plays back the scripts in a loop to populate the database.

    Please see the below data collected by the team.

    Read more
    stiirr's picture

    Need help creating databases in drupal installation

    Its about drupal installation
    I have have uploaded the drupal 6.3
    but facing problems in database commands as i am new to mysql and drupal as well
    will it be possible for anyone to give few minutes if i forward my account info.
    Regards.
    gitesh

    Read more
    Subscribe with RSS Syndicate content

    MySQL

    Group organizers

    Group notifications

    This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

    Hot content this week