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

1
vote
1answer
43 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
6 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 ...
-1
votes
1answer
27 views

Can't backup MySQL database due to SQLSTATE[HY000]: General error: 2013 & 2006 [closed]

Every night at 0100 I backup my database. Today it failed with the following error: Info: Initializing SQL dump method Info: Successfully finished dump of mysql database information_schema Warning: ...
-1
votes
0answers
10 views

User picture lost, on D6 […/pic.jpg path] to D7 [fid] migration. How to get FID?

Drupal 7 mysql users->picture field is a int(11) fid. Drupal 6 mysql users->picture is a "files/avatars/picture-20.jpg" path. My D6 to D7 port didn't get the fids for my users->picture, they're all ...
0
votes
1answer
12 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
12 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 ...
1
vote
1answer
24 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
28 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
28 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
32 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
42 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
130 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
30 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
10 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
109 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
26 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
100 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
31 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
35 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
20 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
27 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
26 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
55 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 ...
0
votes
2answers
138 views

drupal 7 PDOException error saying I'm missing a table or view mysite_drupal.cache_views

The full warning message goes like this: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite_drupal.cache_views' doesn't exist: TRUNCATE {cache_views} ; Array ( ) in ...
1
vote
0answers
20 views

Update MySQL Table og_membership, how to then update Drupal without Clear All Cache

New to Drupal and I can't figure this one out. My company wanted an external way of updating a User's group, I found that the groups were located in og_memebership and with a update UPDATE ...
1
vote
2answers
94 views

Alternative ways to clear the Drupal cache

We have a busy database server and when we try to clear the cache on Drupal, Drupal tries to TRUNCATE cache tables and that causes a backlog until the MySQL hits to maximum number of user connections ...
0
votes
0answers
41 views

Create MySQL view based on a view from the views module

There is a module called Webform MySQL Views that takes the data submitted from a webform and creates a MySQL view allowing other system to easily access the data. I am after a similar solution to ...
0
votes
1answer
25 views

Create backup of MySQL database alongside Features module

When collaborating with other developers, we are using Features module and push it to a repository, this way the files can be pulled to the developer's own development environment. Our problem is the ...
0
votes
1answer
61 views

How to update url_alias after SELECT FROM url_alias

After a rather clumsy migration by a previous developer, my new client's site has a whole bunch of incorrect paths, which I'd like to update in bulk (nearly 7000 nodes, so I'll not be doing this by ...
0
votes
1answer
54 views

Mac to Windows Database issue

I've been developing a Drupal site for over a year on my MacBook. The production server that the Drupal site will run on is Windows Server 2008 R2. As I try and load the SQL file from my MacBook, I'm ...
0
votes
0answers
126 views

Drupal 8.x-dev: require_once() error when trying to install

I'm trying to install Drupal 8.x-dev (the current one - just downloaded) - I know it's still beta and unstable, but I need it for some reason. Anyway, after uploading files and running the ...
0
votes
1answer
54 views

Website is getting very high load due to “UPDATE cache SET data…”

It's a high traffic website, but I guess high load is not because of traffic because many times it runs smooth on same traffic. I researched a lot and optimized Apache, switched off logging modules to ...
0
votes
1answer
105 views

db_update add value to field [duplicate]

I want use db_update to update a field,instead of update a field with new value (replace) , I want add a value to last value, I know I can do it with mysql command UPDATE ...
0
votes
0answers
15 views

how to transfer members and orders data from one drupal to its test site?

I've an ecommerce kickstart drupal site. I made a copy of drupal installation including db on test environment for several updates and fixes. After its done I'm done with test site, when I tried to ...
0
votes
0answers
35 views

MySQL Error: Duplicate Entry on indexing taxonomy structure with Search API

Problem I have a search index. I use a views page with this to create a search page and results for users. I was forced to re-create my search index. I deleted the old one and I'm getting the ...
0
votes
2answers
32 views

Update database with data from dev site?

I've made changes to 12 nodes on a site that already has about 4000 nodes. I'd like to be able to push these changes to the database without affecting any other data (and without having to redo all ...
0
votes
1answer
104 views

how to force drupal to create tables with ENGINE=MyISAM

this is a popular error in drupal that you guys might have seen this before : PDOException: SQLSTATE[42S02]: Base table or view not found, table .... does not exist. when I'm trying to install ...
0
votes
1answer
92 views

openatrium installation error? [duplicate]

I installed openatrium locally on Wampserver2.4, after installing all the 186 modules, I goes to site home page, but it show following error how to cope this error
2
votes
1answer
90 views

Flag module not joining flagging with EntityFieldQuery?

I'm using EntityFieldQuery to pull nodes based on a flag created with the Flag module (3.2): $query = new EntityFieldQuery(); $query->entityCondition('entity_type', 'node') ...
0
votes
1answer
174 views

How to connect Drupal 7 to MySQL with SSL connection

I have Drupal 7.24 / PHP 5.3.27 and am using the PHP native MySQL drivers. PHPinfo shows that SSL is supported. I can't seem to get Drupal to connect to MySQL with SSL. Works fine without it. I ...
0
votes
0answers
30 views

Block View - Most Time Consuming - Optimise

I have a block view showing the title and thumbnail of an amazon store item (from the Amazon Store module). According to New Relic tool it shows that this block view is the most time consuming ...
1
vote
2answers
127 views

Query takes nearly 6 secs. Is it ok? [closed]

I switched on Devel logging on site (shop on Drupal Commerce), went to Shop->Orders and saw that 3818.231 views_plugin_query_default::execute P A E SELECT commerce_order.order_id AS order_id, ...
1
vote
1answer
141 views

How to set mysql port for Drupal and Drush

My site was running fine with the following default setting in settings.php file: 'host' => 'localhost', 'port' => '' Then I created a separate mysql instance on another port: 'host' => ...
0
votes
1answer
137 views

Trying to add a column of Mysql timestamp through hook_update

I was trying to add the column of MYSQL Timestamp to the Database Table, the Query seems to be working correctly in mysql console.But when I execute the same in db_query() the following error is ...
0
votes
1answer
20 views

I need to store an array of integers for configuration of a custom module - which of these is right?

This is a list that is permanently recorded that should be able to change at a later time, either adding or removing items from the array at a user's discretion. First method: ...
0
votes
1answer
29 views

Drush update for the first time hosed my website

Running latest versions of Drupal, etc. Localhost - dev site Maintenance mode While trying to install Commerce_kickstart and running Drush for first time to update modules, Drupal got completely ...
0
votes
1answer
23 views

whats the best way to run 2 sites but use same database with same prefix on Drupal 7?

basically i want to create a duplicate of the site and place it in a separate folder to the main site on the same domain, and have both sites use the same database, so that if one site changes ...
0
votes
0answers
106 views

Migrating a site that's been updated from 6 to 7

I had a Drupal 6 site on a server that I've made a local copy of using Backup & Migrate. I've now upgraded this site to Drupal 7 on my localhost. When I try to move this to a server (or, as I've ...
0
votes
1answer
89 views

/admin/modules and Views Edit pages take forever to load

I recently noticed that two specific sections of my site are taking forever to load, /admin/modules and /admin/structure/views/view/{any-view}/edit. Before I disabled the PHP max_execution_time (only ...