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
16 views

How I can disable block view from database D7

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away I have Last error, this error will be resolved when a user increase max allowad packet Im do it and set it 500MB, and Im ...
0
votes
0answers
11 views

With a Two-Tier Drupal Architecture, Should you Put More RAM into the MySQL or the Apache Box? [on hold]

If you're spinning up a two-tier Drupal 7 environment (Apache on one server, MySQL on another), how would you allocate RAM? If there's a ratio to stick to, that would be handy, too (e.g. 2:1, MySQL to ...
0
votes
1answer
16 views

Pulling user data from external database

I have a game that utilizes mongodb to store the user information. What I am trying to do is use drupal as a community front so users can register for the game in drupal. The problem is that I don't ...
0
votes
2answers
26 views

delete users and all its related records

Is there a way I could run mysql query from the backend to delete all the users and its related records except master-login. There are some modules that help to do it or a via drush command but I am ...
1
vote
1answer
29 views

How can I remove emoji from all user input?

It looks like iPhone emoji are not currently supported in Drupal 7 on MySQL. When I try to save a node containing an emoji (I 💛 U!) in the database, I get an SQL error: PDOException: ...
0
votes
2answers
49 views

How to create sql alias in drupal 7

How do you achieve the highlighted 'node' alias when using the Drupal 7 database abstraction language? This is the original query produced by the view SELECT node.title AS node_title, node.nid AS ...
0
votes
0answers
47 views

Tracking the userID

Where can I find the code where Drupal sends strings (such as the userID) from a content submission page to the node table in the database? If you know of a guide that explains the Drupal content ...
0
votes
1answer
25 views

Help me with my page, when open this page shows me this:

PDOException: SQLSTATE[HY000]: General error: 145 Table './mapibrasil/watchdog' is marked as crashed and should be repaired: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, ...
0
votes
0answers
8 views

Drush won't bootstrap database in Windows

I'm using Windows IIS running under the Parallels Plesk control panel and installed Drupal 7.2.x and I also install Drush. I'm able to run basic commands but I'm unable to run any commands like SI or ...
0
votes
1answer
31 views

Corrupted mysql cache_rules table - dropped the table and now I cannot create it anymore!? Stuck

I'm not sure how this happens, but the cache_rules table is corrupted and it prevents me from doing a drush cache clear all. I dropped the table successfully, but now I can't create it. Throws this ...
0
votes
0answers
35 views

Drupal PrivateMSG Module: How to print Inbox msg Count & Outbox msg Count?

Can someone please tell me how to do this please? I know how to display the unread count, but i also need to print the inbox and outbox count in my custom module. Some help would be much appreciated, ...
1
vote
1answer
16 views

EntityFieldQuery with “NOT IN” FieldCondition and “=” FieldCondition on the same multi-value field is only processing one FieldCondition

The EFQ is: $query->entityCondition('entity_type', 'node') ->fieldCondition('field_terms_wb_access', 'tid', array_keys($children), 'NOT IN') ->fieldCondition('field_terms_wb_access', ...
1
vote
1answer
49 views

Find users who have not uploaded certain contents in last 30 days [closed]

I need to find users who have not uploaded certain contents in last 30 days. I have tried this query it is not working. Can anyone help me? select uid, max(created) as max_created from node where ...
0
votes
0answers
11 views

How do I handle large tables when performing a migration with the Migrate module

I am using the migration module to import a list of machine parts from a simple mysql table. The table has six columns and around 320,000 rows. My first attempt used a query that pulled in the ...
0
votes
1answer
68 views

Security issues while using external javascript and php files to access mysql database in drupal nodes

I have created a search_interface node which asks for filters and onClick event of the submit button, I have called an external search.js script. My search_interface node is of a custom content type ...
0
votes
1answer
67 views

Show custom query page based on user logged in

I want to make a customized query page based on the user who is logged in. The query page is a node made in custom made content type "query"(this content type has no additional fields than which are ...
0
votes
1answer
37 views

Recieving PDOExceptions and missing fields and table on Module installation

I'm new to Drupal and it's pretty much my first experience of adding Modules. I've mostly being using the Migrate module so far in. On loading I'm getting PDO errors which are created by either ...
0
votes
1answer
38 views

Finding data using MySQL queries in the Node tables

Outside of the Drupal system I am trying to get user data based off of the user table and export this information into a CSV. I'm not quite understanding how the Node table system works and where to ...
1
vote
0answers
11 views

I'm getting an error saying I'm inserting a duplicate entry when there isn't one

I have a form for users to update labels for cameras that my Drupal 7 module is displaying. When the user submits the form, first I check to see if the submitted value already exists int he DB: ...
0
votes
0answers
20 views

hook_views_data Join mySQL tables

I've 2 tables (remote db as afar as Drupal is concerned): pc_energy pc_energy_cstm I wish to join them on pcutl_pc_energy.id = pcutl_pc_energy_cstm.id_c While there are many cols in both tables I ...
0
votes
2answers
146 views

After enabling MySQL replication getting deadlocks when clearing cache

I recently setup my production MySQL server for replication. To do this I enabled innodb_flush_log_at_trx_commit and sync_binlog and set bind-address. A slave server on the opposite corner of the US ...
0
votes
3answers
107 views

How to populate DB values in content type field, drupal 7

I have created a content type with 4 field in Drupal 7. One field is of list type, say for listing countries. I have tables in DB for saving country_id and country_name. Is there any way to connect ...
0
votes
1answer
46 views

View API connection to external DB

I've a Drupal 7 site setup on an AWS server, and I'm trying to access a mysql db on a AWS RDS.(The Drupal db is located on the Drupal server, the table I'm trying to get is just to access some ...
0
votes
0answers
17 views

Drupal does not show site

I have the following error on my drupal Site, PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'filename' in 'field list': SELECT name, filename FROM {system} WHERE status = 1 AND ...
0
votes
1answer
41 views

why drupal webform form setting shows mysql errors in dblog?

I have created one webform in Drupal 7 in which some form components are present. But when I'm going to view that webform the components(fields) are not displayed. Then I checked in form setting that ...
0
votes
1answer
15 views

Upload and download doc,pdf file

in my site,i want users(students and teachers) to upload a file and and download the same by rest of the students and teachers.. is it possible? if so how can it be done.is there any module.
0
votes
1answer
20 views

if I change site with local devdesktop it will not change anything with my live site?

I am new so bare with me! I am using a local acquia dev desktop 2 beta and want to make sure if I play around with it in drupal it will not change anything with my live site. We do not host with ...
0
votes
1answer
61 views

“SELECT DISTINCT node.nid AS nid” killing MySQL performance?

My database server's CPU has been pegged for the last two hours and the site is down as a result. Looking at the process list, I see dozens of queries that all begin "SELECT DISTINCT node.nid AS nid," ...
1
vote
1answer
52 views

Migrate old admin's posts to his new user

I'm taking over maintenance of a Drupal site but the old admin is staying on as a user. I need to adjust the ownership of the posts currently under uid 1. Is this query sufficient or is uid ...
0
votes
0answers
10 views

Navigation and banner does not show up after logging on drupal 6

Recently I moved a drupal 6 site to another server. After the transfer everything seemed normal until I log in After logging in I realised navigation and banner views don't show up and also I cannot ...
0
votes
1answer
24 views

How to embed a comment in an entity-field query

In reviewing the slow query log, some of them are entity-field queries. With a normal select query, I can have something like: $query = "/*" . __FILE__ . ":" . __LINE__ . "*/ SELECT... and with pdo ...
0
votes
1answer
59 views

Drupal 7 connection to MS SQLServer/PostgreSQL [closed]

I'm building an architecture of an integrated system of databases that are going to be the infrastructure of about 60 websites. since databases are going to be massive (more than 30000 articles will ...
2
votes
2answers
36 views

Find out module versions through database dump

I've got a dump from my Drupal database that I've created with Backup and Migrate. I want to find out which versions of the modules ctools and Panels have been in use. Where do I have to look? What ...
1
vote
2answers
51 views

Is it possible to publish from my local computer a node in my drupal page remotely?

I wonder if it is possible from a SH script on my local computer, publishing content on a remote installation of drupal. Why have a gammu sms gateway and when a new sms on my local computer I want to ...
0
votes
0answers
74 views

Factor(s) other than max_allowed_packet that cause 2006 MySQL server has gone away

I am getting 2006 MySQL server has gone away with drupal 7.26 when connected using localhost (a2hosting with cpanel account) especially when admin pages and some of view's page are accessed. The ...
0
votes
1answer
94 views

Table is not creating while installing the custom module in drupal 7 [Access Violation Error ] [closed]

I am creating a simple module. In that module I need to save the values in a table and I have created an .install file to create the table when the module is installed. While installing the module, ...
0
votes
2answers
56 views

How to create a drupal view using sql

Is there anyway for me to create a Drupal view from two sql queries and have two separate outputs. Here is the two SQL queries I want to create a view from: SELECT f.delta AS ...
8
votes
1answer
179 views

Recover a deleted field

I have a content-type with 4 fields each of which is a term reference. There are 100 nodes each assigned 4 term references. I have accidentally deleted one of these fields from the ...
0
votes
1answer
36 views

How to get a list of all Groups sorted according to latest comment created on any of the Group Content belonging to that Group?

I wrote the following custom query to get a List of Groups sorted according to latest comment created on any of the Group Content belonging to that Group (not on the group itself) . However this ...
0
votes
0answers
13 views

Why do I have 0 orphaned tables when I try to adopt tables?

I'm following the instructions here: https://drupal.org/node/1658784 in an attempt to create an event RSVP response listing based on webform submissions. I have the correct modules installed and ...
2
votes
1answer
120 views

Where can I get MySQL structure documentation for drupal?

I want to understand the way things are structured in mysql database. Where can I get documentation on the meaning of various table columns in database?
0
votes
1answer
43 views

Auto Increment - Order/user numbers not changing

I've executed the following via phpmyAdmin but nether the order nor user numbers change. ALTER TABLE 'users' AUTO_INCREMENT = 1025; ALTER TABLE 'commerce_order' AUTO_INCREMENT = 1025; I checked ...
0
votes
0answers
21 views

How to see if MySQL is caching correctly? Drupal 7

It seems in Drupal 6 it was available in the status page by clicking the MySQL version link and you could see if your MySQL was caching properly or at all. Where can I find this info for Drupal 7?
6
votes
1answer
133 views

Drupal 7, MySQL, InnoDB, and transactions [duplicate]

I was reading default.settings.php for Drupal 7.x this afternoon, and came across this comment: /* * Some database engines support transactions. In order to enable * transaction support for a ...
0
votes
2answers
43 views

Adding a unique key to Drupal column

I'm just doing a one-off script, but I'm wondering if there's a correct "Drupal way" to alter a table and a unique key. For example, this is essentially the query I want to do: ALTER IGNORE TABLE ...
0
votes
1answer
79 views

I'm trying to get all duplicate rows using db_select

Before I run db_delete, I'm trying to run db_select to test that I am getting all duplicate rows, based on a specific column value. db_select('node_revision', 'n') ->where('n.nid NOT IN SELECT ...
0
votes
1answer
27 views

Drupal installation creates innoDB tables even though myIAM is set as default in my.ini

Drupal installation creates innoDB tables even though myIAM is set as default in my.ini whenever i install a new Drupal 7.26 on my XAMPP (ApacheFriends XAMPP Version 1.8.2) running under Windows 7 I ...
0
votes
1answer
48 views

howto db_select and cross join on drupal?

a table: CREATE TABLE `a` (`id` int(10));INSERT INTO `a` (`id`) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); I need to make a cross join tables in drupal using db_select: $query = ...
1
vote
0answers
36 views

How do I tell if the current revision is the published one

I'm loading each entity and trying to see whether or not the entity is the latest revision. $query = db_select($entity_items['revision table'], 'revision') ->fields('revision', ...
0
votes
0answers
132 views

Drush can't connect to MySQL through socket

When trying to install a new drupal with drush si standard --db-url=mysql://root@localhost/drushtest I get the following error Message: [...] SQLSTATE[HY000] [2002] Can't connect to local MySQL ...