MySQL Server, Workbench and Xampp - Yash-777/LearnJava GitHub Wiki

MySQL Workbench

Configuring MySQL Workbench

  1. Open MySQL Workbench on your local machine
Click on the (+) icon Fill in the connection details and you can optionally store your password in the vault.

Visual SQL Editor

MySQL Table Editor Main Editor Window


Database Design and Modeling Reverse Engineering a Live Database

To reverse-engineer a live database, click Database and then Reverse Engineer from the menu.

Bug 100540 : ERROR: (0, 7) "My_Table" is not valid at this position for this server version, expecting an identifier

SQL-MODE = REAL_AS_FLOAT,PIPES_AS_CONCAT,IGNORE_SPACE,ONLY_FULL_GROUP_BY - Add this in Reverse Engineer Database Wizard Connection Options Advanced tab add SQL-Mode property value.


Error Code: 1175 You are using safe update mode

-- disable safe update mode
SET SQL_SAFE_UPDATES=0;
-- execute update statement
UPDATE table SET column='value';
-- enable safe update mode
SET SQL_SAFE_UPDATES=1;

MySQL - SET FOREIGN_KEY_CHECKS - Check or Not Foreign Key Constraints

-- Specify to check foreign key constraints (this is the default)
SET FOREIGN_KEY_CHECKS = 1;
 
-- Do not check foreign key constraints
SET FOREIGN_KEY_CHECKS = 0;
SET GLOBAL FOREIGN_KEY_CHECKS=0;