Tags » Mysql

MySQL - Workbench - Error - "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column." ( Error Code: 1175 )

Background

Using MySQL’s Workbench to run a simple query.

But, ran into an easy to remediate error.

Query

SQL


start transaction;

    delete from `sales`.`order`;

    delete from `sales`.`product`;

    delete from `sales`.`customer`;

commit
;

… 188 more words
MySQL

Enable RDS logs in AWS Cloud Watch

How to enable slow query, error logs and see those details in AWS Cloud Watch?

Solution: When creating a new MYSQL or MariaDB instance then select slow query in the Log exports section or if instance is already created then select your RDS instance, modify and then select the appropriate option. 180 more words

Mysql

MySQL - Insert/Ignore

Background

In our last post, we touched on a duplicate key error.

Here is another quick workaround around the same issue.

Lineage

  1. MySQL – Insert/On Duplicate Key Update…
  2. 305 more words
DBeaver

MySQL - Backup Scripts for windows 2

:Start

cls

@REM *** PARAMETERS/VARIABLES ***
SET BackupDir=c:\TEMP
SET mysqldir=C:\Program Files\SWsoft\Plesk\MySql\bin
SET mysqlpassword=admin
SET mysqluser=admin
@REM *** EXECUTION ***
@REM Change to mysqldir
CD %mysqldir%
@REM dump/backup ALL database, this is all in one line
mysqldump -u %mysqluser% -p%mysqlpassword% --all-databases >%BackupDir%\DWSystemFullBackup_%random%.sql
@REM - YOU ARE DONE!

pause
::@timeout 5
::@goto Start
Open Source

MySQL - Insert/On Duplicate Key Update

Background

There is a slight ditch one can fall into in MySQL.

Thankfully it is easy to address.

Error

Error Message

Text

Error occurred during SQL script execution

Reason:
SQL Error  : Duplicate entry '2-3-1' for key 'order.unique_Sales_Order_CustomerID_ProductID_numberofEntries'

… 124 more words
DBeaver

Coding Basics: Database

1K Blog Marathon: Day 60

When I was starting to learn programming, I didn’t know a Database. So when saving data, I am using a text file, I create it dynamically (if not existing), read the text inside, and update if needed. 407 more words

1000 Days Of Blog