Category "mysql"

TypeORM column type dependant on database

I have simple entity @Entity() export class File { @PrimaryGeneratedColumn() id: number; @Column({type: "mediumblob"}) data: Buffer; } Which

Error in MySQL when setting default value for DATE or DATETIME

I'm running MySql Server 5.7.11 and this sentence: updated datetime NOT NULL DEFAULT '0000-00-00 00:00:00' is not working. Giving the error: ERROR 1067 (420

i intended to send some information and their value to fill up the columns in the database. Such information are title, image ,description ,and price

echo '<pre>'; var_dump($_FILES); echo '</pre>'; exit; $errors = []; $title = ''; $price = ''; $description = ''; echo $_SERVER['REQUEST_M

MYSQL - Count Query Taking Time

I am running the following query and it's taking more than 12 sec on my local system. SELECT DISTINCT entity_id_0 FROM (SELECT DISTINCT c0_.enti

Add record for each array elements if missing in table

I feel like I need a little push to break through this one. I have this array of players $playerids = ['1', '2', '3', '4'] I have this array of periods $period

Laravel Database Strict Mode

I'm little wonder please help me out. My query is :- Invoice::join('orders', 'orders.invoice_id', '=', 'invoices.id')->groupBy('invoices.id')->get();

Find a record containing all or a part of a list of id of other table in a many-to-many relation on MySql/Jpa?

In my web application, I have 3 tables: TAB A: Recipes (id, name) TAB B: Recipes_Ingredients(id, fk_recipe,fk_ingredient, quantity) Bridge table TAB C: Ingredie

not able to connect to mysql docker from local

I am trying to connect to mysql database from docker image. However it's throwing errors. following is the docker image I am using. https://hub.docker.com/_/

find in set in laravel ? example

I am new in laravel. My query is i need to find out value from comma separated field. Here is my table: tags_value id tags 1 css,html,php 2 php,java,css 3 java

mysql slow on updates for a well optimized query

i am facing an issue with update state , which takes up to 4s on very small queries . Count: 1 Time=3.87s (3s) Lock=0.00s (0s) Rows=0.0 (0), ***[***]@localho

laravel 5.6 bulk inserting json data

I am trying to build an API to store and retrieve MCQ exam papers. I am using laravel resource class to send handle Json data. I need to insert 40 records into

merge two tables with different columns mysql

I want to merge two tables with different columns mysql. For e.g. Table 1 : ------------------------------------------------------------- item_id title sl

MySQL syntax Error on Create Trigger

Here is my trigger, I am getting the MySQL syntax error. I wanted to reduce the balance from sms_index table sms_count column value. CREATE TRIGGER sms_log_up

How to fix Error Code: 2068. LOAD DATA LOCAL INFILE file request rejected due to restrictions on access?

When I execute the code below I get Error Code: 29. File '/Applications/XAMPP/xamppfiles/htdocs/Gefle442/csv/places.csv' not found (Errcode: 13 "Permission deni

mySQL query to find multiple strings in any order within a single field?

In one column of a database, we store the parameters that we used to hit an API, for example if the API call was sample.api/call?foo=1&bar=2&foobar=3 th

Spring using windows user instead of given username 'root' to hit the mysql

Getting the error "Access denied for user 'DEll'@'localhost' (using password: YES)" In the spring xml file I have given the user as 'root' not dell. I ha

Are varchar(50) and varchar(10000) the same? [duplicate]

I have read a article that claim varchar(10000) would use more ram than varchar(50), but I have doubt with it. I have run a simple test: creat

MySQL Workbench host mismatch

I already installed MySql Workbench 6.3 in my laptop with an operating system of windows 10, but when I created a connection and open it there is an error which

Incorrect string value error for unconventional characters

So I'm using a wrapper to fetch user data from instagram. I want to select the display names for users, and store them in a MYSQL database. I'm having issues in

How is it possible for InnoDB to deadlock on a single row?

According to The Good Word, InnoDB uses automatic row-level locking. You can get deadlocks even in the case of transactions that just insert or delete a sin