Mysql Archives - 7-Views
Disable ONLY_FULL_GROUP_BY
If you want to disable this from Ubuntu 18+ please follow following details. Go To Command Prompt cd /etc/mysql/conf.d sudo nano disable_strict_mode.cnf and add following Snippet [mysqld] sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION save and then restart and mysql. it will work.
Check For Foreign Key Constraint Violation In Laravel
DB::statement(‘SET FOREIGN_KEY_CHECKS=0;’); //Check Disable //DO YOUR OPERATION HERE DB::statement(‘SET FOREIGN_KEY_CHECKS=1;’); //Check enable
MySQL – UPDATE query with LIMIT
Many a times there are certain conditions where ou want to update your records with certain limit attached to it. To update multiple rows using limit in MySQL can be implement by a query: UPDATE table_name SET field=’1′ WHERE id IN (SELECT id FROM (SELECT id FROM table_name LIMIT 0, 10) tmp);
Unblock Limit Login Attempts in WordPress
Sometime wordpress limit login attempt may lock you from login to your wordpress site. If you have entered the wrong password a multiple times. To get rid of that , we are showing you how to unblock limit login attempts in WordPress. People who are familiar with MySQL and phpMyAdmin, you can easily run the […]
Defragment to Recover Space in MYSQL
If our application is performing a lot of update delete operations on a certain table then there is high possibility that it contains fragmented space. The OPTIMIZE TABLE statement allows MySQL DBAs to reorganize physical table storage in order to achieve three main goals: Shrinks the data pages Shrinks index pages Computes Fresh Index Statistics […]