Updating your raspberrypi

Updating the GPU firmware on Debian/Raspbian

You can update the firmware using rpi-update by Hexxeh. On Raspbian, you can install it by running

sudo apt-get install rpi-update
To update the software, run

sudo rpi-update
Updating userspace and kernel Software on Debian/Raspbian

sudo apt-get upgrade
If there are any errors, you can try updating the database first by running

sudo apt-get update

Source: stackexchange

MySQL INSERT INTO UNIQUE index

Inserting into MySQL UNIQUE indexes can lead to errors (e.g. Duplicate entry ‘3’ for key 2). Either use INSERT IGNORE or the ON DUPLICATE KEY UPDATE Syntax.

13.2.5.3 INSERT … ON DUPLICATE KEY UPDATE Syntax If you specify ON DUPLICATE KEY UPDATE, and a row is inserted that would cause a duplicate value in a UNIQUE index or PRIMARY KEY, MySQL performs an UPDATE of the old row. For example, if column a is declared as UNIQUE and contains the value 1, the following two statements have similar effect:

Source: MySQL :: MySQL 5.7 Reference Manual :: 13.2.5.3 INSERT … ON DUPLICATE KEY UPDATE Syntax

Back to Top