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

Drupal 7.4.2 Can't Login after installing MySQL 5.7.9

I have a Mac with the following PHP 5.6 MySQL 5.7.9 Apache/2.4.16 (Unix) Drupal 7.4.2 After upgrading to El Capitan and deleting MySql and then installing a new version of MySql, I can no longer ...
1
vote
0answers
15 views

website shows unavailable while taking DB backup?

My website is created using Drupal 7 on one instance of amazon & database is on amazon RDS . whenever i am taking backup of database using Mysql with root user & simultaneously when a ...
0
votes
1answer
13 views

How to sort on different columns in the same view Drupal 8

I'm trying to build a Glossary View in Drupal 8. Let's say I have 3 content types: Person, Article, Event. I want sort by title ASC for Article and Event, but sort by Last Name for Person. So that ...
0
votes
0answers
16 views

How to use views union with a Gmap view? Need help with complex sql table joins.

I'm trying to show a map of my users in relation to points of interest. This is difficult, because the users and nodes are in different base tables so it's necessary to use Views Union ...
1
vote
1answer
23 views

How to iterate through an object returned by fetchAll?

Since fetchAssoc was returning only one row, i was forced to use fetchAll. The problem is fetchAll returns the data as an array of objects. Iterating through them is kind of painful, not impossible ...
0
votes
1answer
12 views

db_select throws PDOException

Trying to do a simple query from a table called 'raffles' under the drupal database. It is not a complex query, Just trying to get all sets from drupal.raffles $query = db_select('raffles'); ...
0
votes
1answer
16 views

Adding a new NOT NULL field to a table causes an error

When attempting to add a new column to a table within an update hook, the error Null value not allowed: 1138 Invalid use of NULL value occurred, the definition was changed to allow NULL, and the value ...
0
votes
2answers
54 views

Max allowed packet issue drupal 7

What causes max-allowed packet issue in drupal 7. We have set the max_allowed_packet size to 1024mb (1gb). Still we are facing the problem in quick intervals. Also dblog module is not working even ...
0
votes
0answers
23 views

Can't access my admin account [duplicate]

This morning suddenly after hours of work I found my self unable to access admin account, just a blank page without any info. The anonymous and authenticated users are logged in normally without any ...
0
votes
1answer
11 views

DB connection works from the CLI, but fails from within Drupal

I have set up a MySQL server on a machine with IP-address 192.0.2.9 (not the real address). The database user is named "drupal". Connecting to it using the CLI mysql command works just fine and the ...
1
vote
2answers
58 views

Where does drush look for the path of the mysql socket (on MAMP)? [closed]

After upgrading from drush 6.5.0 to 8.0.1-dev through brew, the drush terminal command returns the popular 'PDOException: SQLSTATE[HY000] [2002]' error. The only way to make it work is to add ...
0
votes
2answers
38 views

How do I automatically update database tables when changing custom entity fields

New Drupal Developer here. I am currently working on a inventory management module for a friend. And I ran into a bit of a snag with Custom Entities in Drupal 8. I have a custom "Customer" entity ...
0
votes
2answers
35 views

Aquia Desktop - How to import a MySql database that is too big

I am using Aquia Dev Desktop. I have a MySql database dump that is too big to upload into Aquia Dev Desktop. What are my options? I am using a Mac, so would appreciate Mac based options Steps I have ...
0
votes
1answer
11 views

Main differences between registry and file_registry tables in Drupal SQL tables structure?

I already know that in computing in general, registry is the main data structure for paths (whether as a table in DB or a as a standalone DB). In the case of Drupal, I saw two tables in the DB's. ...
0
votes
1answer
9 views

Using SQL how do I select the value of a translated field in a specific language?

Give an entity field that has been translated into the target language, how do I retrieve a specific language version using SQL - not php. Give this query for instance (using an imaginary field ...
0
votes
1answer
19 views

How to get Signatures for Forums using SQL query?

In a D7 site, I'd like to get all of the user signatures using raw mysql query . I've found a signature_forum_post table but could not figure out how to make a query that returns both user.id and ...
1
vote
1answer
31 views

Drush sql-dump but exclude multiple tables with a pattern

I have a gigantic database due to having over 1000+ individual tables created for every time someone logged in. (wasnt me that made this). I want to now create a dump of the database using drush ...
0
votes
1answer
48 views

How to make a raw SQL query to get the node/node_votes pairs?

I'm not familiar with drupal. Using raw SQL, I'd like to extract votes given to each node, but I wonder how vote_rating is related to node? I see that the votes are stored in field_vote_rating of ...
0
votes
1answer
43 views

Removing all unapproved comments from database dump file

I got thousends of spam comments on my drupal 7 site. The mysql database file is grown to 1.9GB and the site is broken. How can i delete all comments (or even better: all unapproved comments) from the ...
0
votes
2answers
79 views

How to debug a MySQL error? [Updated]

I have been building a Drupal 7 site on my Mac. Using PHPMyAdmin, I have exported a sql dump of the database. When I upload this sql file to my host, I get the following error message: There seems to ...
0
votes
1answer
20 views

Database error when creating entities using hook_update_N

I'm trying to create an entity (using entity->save()) in a hook_update_N function. The errors appear at the mysql insert query in the entity's insert function; the insert strings are wrapped in ...
0
votes
0answers
55 views

Using multiple keys on multi row db_merge?

I am using db_merge (mysql) for getting jobs into my queues. I therefore have each task only once (the job is quite intensive and many things can trigger the task to be queued, so want to avoid ...
1
vote
0answers
18 views

Select/Update column based on uid/nid (don't overwrite/ignore duplicates)

Short Overview I'm (attempting) to build a video tracking system in drupal 7 but am having trouble with database inserts and updates. I have my table with four fields from my .install which looks ...
3
votes
1answer
142 views

How to 'drush sql-dump' all databases

I have two databases I connect to with drupal. Does drush sql-dump back up all databases defined in settings.php? If not how can I create dumps of both databases? I've attempted using the ...
0
votes
0answers
55 views

Error in migrating site from localhost to web server

I'm trying to migrate a Drupal 7 site from localhost to a web server. Web server uses MySQL DB and Apache as web server. I moved the entire site using a ftp client (FileZilla) and I imported the ...
1
vote
0answers
17 views

Localhost > Subdomain Server Upload > WSOD [duplicate]

I've just completed uploading my databases and site from localhost to the server (destination is a subdomain hosted on bluehost). So far I have: Created a new mySQL db; uploaded the old db into it. ...
-1
votes
1answer
20 views

Delta option of term field missing in views

So I have a view that's been working for the last year. now suddenly there is a missing broken handler. Turns out that the missing field is a delta (field) of a term reference field, the term field ...
1
vote
1answer
91 views

Deadlock on cache table drupal

My client site has huge data, which they want to download into CSV through View data export module, when multiple users are trying to download the csv file, its resulting in an error. In log messages ...
0
votes
0answers
54 views

unable to install Drupal and modules on my new laptop

I have a new laptop; windows 8.1 64bit. Im using wampserver with apache 2.4.9 and php 5.5.12. My laptop has Microsoft Visual C ++ 2012 installed. Before installation i created a database. I copy and ...
1
vote
2answers
53 views

Importing content from non-drupal database - help with SQL please

I have a website with guitar lessons that I am converting to drupal. I am new to drupal and have started getting familiar over the past few days. I created a content type for lessons and exercises, ...
1
vote
1answer
33 views

Integrity constraint violation: 1052 Column 'uid' in on clause is ambiguous [closed]

I am using migrate module to transfer data from one site to another here is my query $query = Database::getConnection('db1', 'db1') ->select('users', 'u'); ...
0
votes
1answer
43 views

How to display only Duplicate values with a view

Background My site is very large already and its only in its infancy. The content title table has 14000+ values in it. To make sure there are no duplicate values in the table I am creating a view ...
0
votes
1answer
37 views

what does {node} node mean

Background I'm trying to understand the SQL queries that Drupal generates when I select different content to be displayed on my site so I can write my own php filters. Issue I see this in the query ...
0
votes
2answers
64 views

Export / import content from Drupal 7 to Drupal 7 via MySQL

I want to migrate all my content from my old D7 website to my new D7 site, with features I exported/imported from all my custom content, views, fields, etc. But I don't understand how to export ...
1
vote
1answer
45 views

Webform to add row to specific sql table

I have drupal running and have enabled a few modules including the webform module. I have opened phpmyadmin and added a new table with specific rows. Now I want to link the two so that a user can log ...
1
vote
1answer
54 views

Field with unique and auto-increments values

I have a content type that in one of their fields need a value that is unique and auto-increment. There are several obvious solutions: Use the node id that is unique and auto-increment. The Serial ...
-3
votes
1answer
77 views

Drupal query uses 'node' - how to change to normal mysql query [closed]

I have a view that is definining a taxonomy term as 'node' in the query eg.: select title as title, 'node' AS field_data_field_category_node_entity_type from node where node.type="product" how can ...
0
votes
0answers
30 views

Importing a Database into Drupal shows no content

I've been trying to get my database imported into Drupal today and I'm having quite a few issues. I'm using VDD with Vagrant / Oracle VM and everything is working properly, I have Drupal 7 up and ...
6
votes
4answers
147 views

How to get an import of a very large Drupal database working?

I'm using Vagrant and OracleVM to run Drupal 7. I've got the site up and running and I'm trying to get my database imported. So far I've run drush cc and cleared the drush cache, and then I did ...
1
vote
3answers
34 views

Need advice on remote storage for load balanced drupal site [closed]

Not quite sure if this is the correct thread to be posting this in, so please feel free to move it if its not. Background: Our developers have nearly finished developing our Drupal 7 based web ...
1
vote
1answer
31 views

db_select query advice

I have two content types: development and house. A development has many houses. Each house has a house_type field I'm trying to perform a db_select query that allows me to search all developments ...
1
vote
0answers
25 views

Date formatter fields in views while migrating mysql to PostgreSQL

I am using drupal 7 and recently migrate my website database from MySQL to PostgreSQL. But in Views ,when i set the date field formatter other than plain, the output display showing current date ...
1
vote
1answer
38 views

How are node and field tables related in MySQL?

I am working on a query that involves the field_data_body Drupal table, and I have been asked to return corresponding node ids for the relevant rows in field_data_body. However, after reaching a copy ...
0
votes
1answer
36 views

Using SQL to output link to a node

Does anyone know - using SQL only - how to output the link to a drupal node? If I was using PHP I think it would be something like this: print l($node->title, 'node/' . $node->nid); But I'm ...
1
vote
1answer
620 views

Why are we using utf8mb4_general_ci and not utf8mb4_unicode_ci?

Drupal is moving to support utf8mb4, however, it is using utf8nb4_general_ci. Why take the time to move over to support it, and then not fully support it? Is there a specific reason, or just ...
0
votes
1answer
30 views

migrating from postgresql 9.1 (non drupal) to Percona Server 5.5 (drupal 7)

We decide to go from a perl website to drupal 7 (PHP 5.5.23). My big question is how do i migrate the DB which is PSQL 9.1 to mySQL. I've heard of the the migrate module, drush, MySQL Workbench. ...
0
votes
1answer
18 views

How to get each db result value count

How to get values count in db_select My query is: $last_item = '2015-07-19'; $query = db_select('field_data_appointment_date','ap'); $query->join('field_data_appointment_slot','aps','aps.entity_id ...
1
vote
0answers
30 views

Umlauts grouped in summary (U and Ü, A and Ä etc)

I faced the problem with summary attachment which includes umlauts like: U and Ü, A and Ä; O and Ö etc. For example if two nodes starting with letters U and Ü Umlauts Ümlauts only U letter will be ...
0
votes
4answers
279 views

How can I run cron.php via crontab?

I'm trying to run cron.php via a cron job set up in crontab on my server via the following command (running every 2 minutes purely for testing while I try and get it working - it will be every 6 hours ...
1
vote
1answer
33 views

Using Cron and CURL in a custom module

I am using a hook_cron (mymodule_cron) in my custom module, but would like to know whether the cron run is successful or not and has sent the data using CURL, and from there, update a specific column ...