Questions tagged [mysql]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Craft cannot backup - Azure

When attempting to backup with Craft, the system returns the following error: The shell command "mysqldump --defaults-extra-file="D:\local\Temp\my.cnf" --add-drop-table --comments --...
1
vote
1answer
29 views

Running Craft CMS 2 on MySQL 8.0+ (Any major considerations?)

Yes, that's not a typo. This is for a Craft 2 site (long story). Because MySQL 5.6 is EOL in a few weeks, I am validating how feasible it can be to run under MySQL 8.0, there's not really any option ...
0
votes
1answer
592 views

ERR_EMPTY_RESPONSE when accessing order data (MAMP)

I've got a local installation of Craft 3.0.37 and Craft Commerce 2.0.0-beta.15 running on MAMP. When completing an order, an empty response is given by the browser. The same thing happens when trying ...
1
vote
1answer
338 views

ERROR 1370 (42000) alter routine command denied to user

I am trying to upload my DB using MySQL Workbench but am getting this error: ERROR 1370 (42000) at line 4534: alter routine command denied to user 'detectalocal'@'%' for routine 'detectalocal....
0
votes
1answer
37 views

How do I upgrade the MYSQL database from Craft 2 to Craft 3 on GoDaddy

How do I upgrade my MySQL DB for a Craft 2 site to Craft 3. I don't have access to the SSH server or use of Composer, so I have to move files via FTP and do everything manually. My client is on ...
0
votes
0answers
12 views

Possible to clean up elements_sites?

We have a website that has around 80k users per month and we're updating around 1k entries per night due to stock updates. The site's been live for almost 2 years and the CMS has become really slow ...
1
vote
1answer
272 views

Can't Backup Database - “Failed with exit code 1” (WAMP Server)

I'm running Craft 3 on a local windows machine, but every time I try to update certain plugins (or Craft itself) I get a message "Couldn't back up the database. How would you like to proceed". The ...
1
vote
1answer
32 views

MySQL 5.6 backup to MySQL 5.7… what to do

I just changed my db server, and I managed to import a db dump to the new system. What troubles me is that, once done, I noticed I have now MySQL 5.7.32, while the previous database server was 5.6.48. ...
1
vote
2answers
277 views

Find entries that use a specific block in their Matrix field?

Suppose a Mtrix field named MyMatrixField has three blocks called Text, Images, and Buttons. What MySQL query would list the section and title for all entries whose MyMatrixField field has a Buttons ...
1
vote
1answer
24 views

Using MySQL With just InnoDB storage engine

What are the implications if I create all the Craft database tables on the InnoDB storage engine? Will there be any performance problem?
1
vote
1answer
74 views

Craft CMS Entries Disappearing

I've setup a Craft 3 site for a client and we are seeing the strangest thing where pages are just disappearing. Best we can tell no-one has deleted the entry, but we get a 404 on the front-end and it ...
0
votes
0answers
25 views

Saving to db with devMode true works, but not when false

// Upload and save as temp file $request = Craft::$app->request; $file = UploadedFile::getInstanceByName('file'); $tempPath = $file->saveAsTempFile(); // Create as permanent asset $folder = ...
28
votes
3answers
12k views

Reset password with MySQL

Is there a way to reset an admin account's password by modifying the MySQL directly? I've found the craft_users table where the hashed password is stored but I don't know how to hash a string so that ...
3
votes
1answer
149 views

Is there a way to convert a Craft MySQL database to PostgreSQL?

I have an existing Craft installation using MySQL and I've only recently realized the error of my ways and would like to convert the database to PostgreSQL. Is this possible?
5
votes
1answer
460 views

Craft CMS with Google Cloud SQL as backend database

Did anybody successfully install Craft on Google Cloud SQL? Or on any MySQL engine with activated replication and active GTID mode?
0
votes
0answers
156 views

Error:unable to open using mode r:fopen() :filename cannot be empty(1) [duplicate]

This is my problem please give me solution My process is in this url http://solution.ap-south-1.elasticbeanstalk.com/solutionpage.php
3
votes
2answers
105 views

Migrate Craft CMS installation from PgSQL to MySQL - any hints?

We need to migrate a Craft installation with a pgsql dump to MySQL. Any hints on the procedure? Thanks, Matthias
1
vote
1answer
30 views

Download database in gzip

With using the CraftCMS builtin database export feature, is it possible to specify the export config to have the file in .gzip instead of just .zip? If, yes, then how can I do it?
1
vote
1answer
33 views

Mass enable entries

I'm trying to set statuses to enabled in mysql. Around 150k entries. The tables are elements and elements_sites. Set status to 1. The query runs OK. In the cp is also everything fine but entries don'...
0
votes
0answers
9 views

Is there a way to sync/migrate the entry under category's entry to that entry's category at the entries

The admin had assigned all the entries to a category under the 'Categories' page. But now instead of adding the entry under the 'Categories' page, the admin prefers to add the category under the '...
1
vote
1answer
11k views

Internal Server Error: SQLSTATE[42000] 1118 Row size too large

I have a very large entry type in craft with quite a few fields. I've been updating a single record on a regular basis but upon adding a few more paragraphs of rich text in a field, I received this ...
1
vote
1answer
74 views

Craft Internal Server Error

I am getting the following error: Internal Server Error CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #34 of SELECT list is not in ...
1
vote
1answer
49 views

How to query in MySQL all entries with related categories

I have a custom product grid not associated with Craft Commerce. I am wondering, how can I query, in the SQL database, all entries and their related categories?
1
vote
2answers
149 views

Get last item added to cart

Does anyone know a nice way to get the last lineItem(s) added to a cart in craft commerce via twig template? Example use case, an 'added to cart' confirmation page. I know for this you could query ...
1
vote
1answer
418 views

Implementing Read-Replica (slave) database connections

I'm thinking about ways to implement this but don't instinctively know the best route in Craft. Our infrastructure is in AWS and, due to other applications, we have access to a read-replica DB ...
1
vote
3answers
920 views

How do I get past this MySQL error installing Craft 3 using CLI

I am using https://box.scotch.io/ (vagrant). I'm trying to install Craft 3 with the cli, but can't get past these errors: Connection refused No such file or directory One or the other error shows ...
0
votes
0answers
177 views

Control panel - Entry indexes very slow

Craft CMS 3.3.15 PHP 7.1.3 MySQL 5.5.42 I have a structure with 360 entries. Right now in the CP it takes 3.5 - 10 seconds to load the first 50. And another 3.5 - 10 seconds for every additional ...
1
vote
1answer
53 views

Using {% cache %} tags around {% template %} includes (or in Header)

I was wondering if it makes sense to wrap these {% cache %} around {% include %} tags that call a separate file with params. Is it better to just include them in the actual file itself? For example, ...
1
vote
1answer
108 views

templatecachequeries entries with of 157.000 characters in query column

after enableling querycaching in craft3 I found rows in templatecachequeries with big amount of characters in the query field. I decoded it with base64 and got this as the largest entry: query_length:...
2
votes
1answer
225 views

Can't backup DB locally with MAMP PRO 5.5.1

I have followed the instructions for this article (https://craftcms.com/guides/database-backups-in-craft-3-with-mamp) to get local backups working with MAMP. However, when I attempt a backup, I get ...
1
vote
1answer
216 views

Local DB SQL 'CDbException' Errors on Craft 2 site

Just tried to get a local site working again but getting all sorts of issues. I have updated the website online and downloaded the database, installed locally. I have also the craft/app folder to my ...
1
vote
1answer
102 views

Is MariaDB required with Craft CMS or can MySQL be used?

I am currently installing Craft CMS on a test server, The server runs other development services. Currently installed on the server is MySQL 14.4. Is Mariadb are requirement or can I utilise MySQL?
1
vote
1answer
80 views

Craft 2.X Local setup error – Craft not connecting to MySQL (via Sequel Pro)

Novice dev here, really struggling to get my local setup functioning. After a couple of days of wrestling with Apache config settings, I finally have Craft connecting via a VHOST setup. The problem –  ...
0
votes
0answers
65 views

Unable to delete Entry: Numeric value out of range

I have a Structure section that I converted to a Channel. I then tried to delete an Entry Type from the Control Panel and get the following error: {"error":"SQLSTATE[22003]: Numeric value out of ...
1
vote
0answers
78 views

Database Query in debugger consistently showing over 2000ms

In trying to optimize my Craft 3 site, I have discovered that it's apparently taking longer than expected to query my database. The duration for the apparent culprit is typically between 1900 and ...
0
votes
0answers
86 views

Emojis on Craft 3 front office

I'm making a blog. I have a wheelform comments input type that needs to be stored as utf8mb4 in the local database. My MySQL database version 5.6 is configured to utf8mb4 in the database, tables, ...
1
vote
1answer
1k views

What is CDbException Error: SQLSTATE[42000]: Syntax error or access violation while moving a site to remote?

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #28 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'site....
1
vote
1answer
307 views

MySQL “Access denied for user” after moving to new server

I've moved my Craft 3 installation to a new server. When connecting to the original database, everything works fine. However, when trying to connect to a new MySQL database (I've tried hosting this ...
1
vote
2answers
62 views

Upload failed. The error message was: "SQLSTATE[23000]: Integrity constant violation:

I'm getting this strange error when I'm trying to upload an .jpg in the assets. Env: Localhost Craft version 3.1.8 MAMP: - PHP(7.2.7) - MySQL: 5.7.21 Upload failed. The error message was: "...
1
vote
1answer
544 views

How to connect to a Remote DB using CraftCMS 3.1+

I tried using Andrew Welch's craft-connect plugin, but the plugin was throwing an error on the REMOTE_DB_SERVER variable. I commented the variable out in the .env file, but I still could not connect. ...
1
vote
1answer
171 views

# of MySQL connections

Assume my website (developed using Craft, of course) is expected to have 1000 concurrent access. How many MySQL db connections would be required to open? Does Craft control this or does it depend on ...
69
votes
12answers
142k views

Getting this SQL Error: GROUP BY incompatible with sql_mode=only_full_group_by

I am getting the following error: Internal Server Error CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #18 of SELECT list is ...
9
votes
2answers
2k views

Craft CLI RC1 Connectivity Issues with MAMP Pro

I've been trying to run the new Craft CLI for the last couple of versions without any success. I figured maybe since we weren't at RC1 yet that it wasn't fully working. After seeing Ryan's video about ...
1
vote
1answer
413 views

Incorrect user-level lock name - Local Vagrant Environment - Craft 3

When creating a new field, I received a Database Exception error - SQLSTATE[42000]: Syntax error or access violation: 3057 Incorrect user-level lock name '/var/www/storage/runtime/compiled_classes/...
0
votes
1answer
534 views

Importing a database from backup

Long story short, I migrated from Craft 2 to Craft 3 but had an issue with a plugin. Database Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'emailTemplateId' in 'where clause' The ...
0
votes
0answers
294 views

Setting up Craft 3 database backup command for a remote database server

I have my Craft 3 database on a separate server than my Craft webserver (load balancing) and when I use the download database backup function in Craft 3, it doesn't know where to look. I haven't ...
4
votes
2answers
2k views

Dump SQL query in Twig template

Is possible to dump a query made on a twig template for a statement like this one for example: craft.entries.section('homepage') Can we some how see the actual SQL query ?
1
vote
1answer
926 views

Randomly getting the “Integrity constraint violation” sql error on saving entry

Randomly getting the "Integrity constraint violation" sql error on saving entry from backend. There no apparent cause of this at least not that I can see, because the same post saves without errors ...
1
vote
1answer
61 views

What could the possible causes be for a mismatch between `craft_fields` and `craft_fieldlayoutfields` MySQL tables?

I'm debugging an Internal Server Error on a site developed by, well, not me. :p The site has an absolutely enormous Matrix field called "Modules", and the blocks in said field have so many fields that ...
1
vote
1answer
158 views

Joining sections (Channel) to query based on a related item attribute

I've been trying this for a while now, so might have read this before. Sorry about that, I'm struggling really hard to get this right. At first I tried (wrongly) with the eager load features. I have ...