MySQL is an open-source, relational database management system. Use this tag for questions specific MySQL, not for saying "I am using MySQL."

learn more… | top users | synonyms

0
votes
0answers
13 views

Drupal webform retrieve csv field values from sql to post to url [on hold]

I apologize for may be posting a duplicate, but did not know there was a specific Drupal section Plz find my original question here: ...
0
votes
0answers
10 views

how to get unquoted value from $join-extra in views_query_alter

We use join->extra to specify a 2nd field in a join condition; this works fine when the value is a literal, but not for field references, which is returned as a quoted literal. For example a join ...
0
votes
1answer
22 views

How to resolve the MySQL error Duplicate entry 'comment_publish_action' for key 'PRIMARY'?

I'm a beginner in Drupal. I want to import my database to my webserver and get this error when trying to do so: "#1062 - Duplicate entry 'comment_publish_action' for key 'PRIMARY'" I don't know ...
0
votes
1answer
23 views

Is this SQL query even possible in Drupal 7?

I'm trying to find a way to run this query in a custom drush command to dump chunks of data from the DB into CVS files. The query works fine directly in the terminal but I was wondering how would ...
1
vote
1answer
42 views

How to access an external MySQL database in a view if SQLite support is not installed?

I would like to display other MySQL database by Views, and having the similar situation as this question. Except, I'm not able to enable the "SQLite", because I have no control on the server end. ...
0
votes
1answer
39 views

How to resolve my timeout during import of my Drupal database using phpMyAdmin? [closed]

I downloaded my Drupal database (in MySQL format, and using phpMyAdmin) from my new web site. I am attempting to import it using phpMyAdmin on my local Win 7 computer running Acquia Dev Desktop. It ...
0
votes
1answer
10 views

What is difference between field tables?

What is the difference between a content_field_myfield and field_data_field_myfield in the db?
0
votes
0answers
10 views

Error while instaling Drupal 7 [duplicate]

Please help about below error. i don't know how to resolve below error. i will try several ways follows from google search and drupal.org forums. but error still comes. please check the below image ...
0
votes
0answers
29 views

Error while adding any field in custom content type [duplicate]

I am unable to add any field in my custom content type, when I click on save button or click on upload after adding images it gives me the following error and for the text field the error is simply ...
0
votes
0answers
12 views

Add multiple conditions in search

I want to add two conditions in drupal core search. First condition contains taxonomy term parent and second condition contains taxonomy term child value. I have developed an interface now i want to ...
0
votes
1answer
39 views

I can't fetch anything else than '1' to my PDO query

Here is my PDO request : $query = db_select('review_ratings_table') ->fields('review_ratings_table',array('review_nid')) ->condition('loc_id', $loc_id, 'LIKE') ...
1
vote
3answers
79 views

Where is the base domain stored in database D7

Is there an equivalent row to the Wordpress "Home" and "Site"? In otherwords, where can I look in the database to figure out what the domain the site is on? I'm using mysql
0
votes
2answers
29 views

Why doesn't the field table in the Drupal database use entity_id as a primary key?

I'm working on trying to optimize a View SQL query and I noticed that the query being executed is using a join on a the entity_id field of a field table. I noticed that for some reason unbeknownst to ...
0
votes
0answers
28 views

GENERATE PDF WEBFORMS DRUPAL [duplicate]

I istalled webform2pdf and tcpdf for download forms and i create form i cconfigure webform2pdf but when i Click in download pdf on the form that i was created i have a error say : Fatal error: Call ...
0
votes
1answer
94 views

Fatal error: Call to undefined function system_run_automated_cron()

I migrated my database from oracle to mysql and when linking it to my drupal the following error: Fatal error: Call to undefined function system_run_automated_cron() in ...
0
votes
0answers
21 views

cpu at 100% after ubercart database update

Recently I updated ubercart tables of my database with newer ones. Now if I want to search for an existing customer inside the order based on email, cpu goes to 100% for 2 minutes freezing whole ...
1
vote
0answers
15 views

From a slow mysql query, is there a way to determine which Drupal module/path is the cause? [duplicate]

My hosting provider (Pantheon) provides mysql slow query logs. Is there a quick/easy way to determined, based on an entry in the log, which module/path is causing the problem? Since I built this ...
1
vote
2answers
44 views

How to subtract two columns with db_select()?

I have a db_select query that outputs two columns. I want to find the difference between these columns, output to another column, and then put a condition on this third column. Here is a mysql query ...
1
vote
0answers
42 views

Connection timed out and lock_may_be_available() on working site

I'm hoping someone can point me to a fix. My drupal 7 app was running fine locally this a.m. while I was testing a way to insert a row using mysql tools for a non-Drupal function. My environment is ...
1
vote
1answer
55 views

connect drupalgap app to drupal site

i have a problem and the documentation of drupalgap is not too specific. I have a site for example "www.mysite.com" and i have in a localhost a site built in drupalgap that i want to connect with ...
0
votes
1answer
86 views

Can't use drush site-install to drop tables and reinstall in MAMP

I have a local multisite instance running MAMP 3.0.7.3, and I can't use the drush site-install command to do a re-install of one of my sites without actually dropping the database first. If I try the ...
2
votes
0answers
47 views

site down due to mysql error but returns 200/OK

A site I help administer was showing a MySQL error page, Additional uncaught exception thrown while handling exception. PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server ...
0
votes
0answers
27 views

creating book hierarchy via mysql inserts

I have imported data from other sources into drupal 7 creating nodes and node revisions with MySQL inserts. I wish to use books module to structure some of my content, and trying to achieve it with ...
0
votes
1answer
54 views

Analyzing slow mysql querries

Our Drupal site has recently started to get much more traffic and often pegs the CPU and memory when we have 50-100 active connections. We have 8cpus and 16GB of RAM. I notice that when the cpu is ...
0
votes
1answer
81 views

Install fails using MAMP – SQLSTATE[HY000] [2002]

I've been trying to set up a local installation of Drupal (I've tried both 7.35 and 8.0 beta9) using MAMP on Mac OS X 10.9.5, but evrytime I get to the "Set up database" part of installation process ...
1
vote
1answer
60 views

Not possible to drush sql-sync sqlite to mysql pragma

I have a local testing setup where I can create drupal sites easily, all running with a sqlite DB. I want to (firstly) publish the site to a remote server using a script that calls drush sql-sync ...
1
vote
2answers
178 views

mysql errors after upgrading php and mysql

recently upgraded server to php 5.6.5 and mysql 5.6.22. running drupal 7. after the upgrade we started having issues. the server seems to run well for a week or so before starting to throw error ...
0
votes
1answer
44 views

How could I do a FULL OUTER JOIN in drupal?

How can I do this code in Drupal? I cannot find how this code is writing in Drupal. SELECT column_name(s) FROM table1 FULL OUTER JOIN table2 ON table1.column_name = table2.column_name;
0
votes
1answer
17 views

How to restrict a page to a group of people?

I am trying to figure out how I can lock down a page (part of my site) to a list of users that I have in another MySQL DB. Ideally I would like to call the DB and see if the user has access each time ...
0
votes
0answers
26 views

Concat query used in a like condition

I'd like to perform a query where I get the value of various fields(stored in different tables) and check if a string exists on them. This is part of a bigger query. What I did until know is : ...
0
votes
1answer
36 views

how do i install drupal with drush

First off, I'm a drush newbie, just installed it and now I want to install drupal on my server, so I did a drush dl drupal --drupal-project-rename=Quaaoutand next I want to do a drush si standard ...
0
votes
0answers
15 views

Recurrent error MySQL writing to /tmp

Need some brains to point me in the right direction please. I've been having a problem with a legacy Drupal 6 set up, recently it has started erring with the following Can't create/write to file ...
0
votes
2answers
35 views

Batch deleting nodes breaks database

On my Drupal site, I have about 100 nodes that need deleting. I have deleted them via Views Bulk Operations. When I do this, if I make a backup of my site MySQL database and then try to restore it ...
0
votes
0answers
149 views

db_select sum operation of multiple tables column

I have two tables table 1 is table 2 is I need sum of points and sum of pur_amount of each uid as per the vuid Here is my code $query = db_select('table1', 'pp'); $query->join('table2', ...
0
votes
1answer
56 views

Does Drupal cache db_query results for multiple users?

I am running into something strange and perhaps someone here can help me. I am trying to prevent two things from happening at once because the second attempt might be influenced by the first attempt. ...
3
votes
0answers
78 views

Drupal Commerce causing database deadlocks

I'm trying to get to the bottom of a known Drupal Commerce bug to do with row locking. When a user logs in on my development site, Drupal Commerce starts multiple identical queries that look like ...
0
votes
2answers
45 views

Adding Placeholders for PHP variables

When creating a query using db_query in my module I want to make sure it's as secure as possible. So I'd like to use placeholders in my 'WHERE' clauses. The problem I'm having is how to use ...
0
votes
1answer
72 views

Run a Drupal website offline (±without server)? — E.g. hand it over on a usb-stick / by mail? — Run it from the HD, while retaining functionality?

Why run Drupal offline? Since I use free webhosting, I don't have 100% up-time, so I started wondering whether I could maintain such Drupal functionality, while at the same time working offline. An ...
3
votes
3answers
125 views

Git-like way of updating Drupal database

It's easy to update Drupal on the local / remote server using Git. However, sometimes when I make modifications in the actual module settings or any other settings on my local server – those are ...
3
votes
4answers
148 views

How can I find a module or activity that is excessively writing to the database?

Problem: We have two productions servers: primary and failover. The two machines are linked via mysql replication. The mysql relay logs are clogging and bringing servers down the failover server. I ...
0
votes
0answers
30 views

How can I stop this query from being run by commerce module whenever I enable or disable new module?

I have a drupal commerce site that I created NOT with kickstart that has about 500K downloadable products (pdfs) and product displays. Whenever I disable or enable a new module, the multiple copies ...
0
votes
1answer
44 views

Problems with SQL Syntax using Left Join and OR

I need some help with my SQL. I've got the following code but it's returning multiples of each item and I don't understand why. When I only include the first Left join it returns results as ...
0
votes
2answers
38 views

My php is showing a numeric value for my list field…Why?

In a form I'm trying to take a value a user selected from a radio button and compare it with what's in the database. The value for the radio button is stored in $form_state['storage']['level']. The ...
0
votes
0answers
32 views

Moving New Content from Local to Remote Prod Site

I have a local development Drupal site using WAMP to build. I moved it over to Bluehost successfully. But now I would like a process to regularly update my remote site with local changes I'm making. I ...
0
votes
1answer
73 views

Displaying Database Data Within the Flow the Site

I have a multi-page form that works fine in and of itself (pathfindertool.module). However, once a user clicks submit I want the page to display some records on the page. And it DOES display the ...
0
votes
0answers
5 views

Is geographical Mysql replication doable in Drupal

I have a website with 3 languages : fr/en/ja. I would like to have 2 database server (or 3 ?) : - DB Server A : manages traffic for fr/en - DB Server B : located in Japan - manages traffic from ja. ...
0
votes
0answers
64 views

How to fix encoding mismatch problem

So I had a local testing Drupal installation, which uses a MYSQL database version which supports utf8mb4 encoding. I deployed this local site to the remote server by copying the files and database, ...
1
vote
1answer
132 views

drush sql-dump gives warning

When I ran drush sql-dump --result-file, it came back with a warning and a success message. system(): Cannot execute a blank command exec.inc:36 [warning] Database dump saved to ...
0
votes
1answer
87 views

SQL replace() function in PDO

I'd like to convert the instructions from this answer into a general script that can be reused across projects. I'm wondering how these commands can be written in Drupal 7 PDO format: UPDATE ...
0
votes
1answer
58 views

What MySQL privileges would a read-only drupal db user need [closed]

I am in the process of configuring a server that will be on the front end and will be the read-only installation. Can anyone give me some guidance on what to look for for in regards to what tables ...