The Problem ERROR 3167 (HY000) at line 17: The ‘INFORMATION_SCHEMA.SESSION_VARIABLES’ feature is disabled; see the documentation for ‘show_compatibility_56’ This is a common issue that…

The Problem ERROR 3167 (HY000) at line 17: The ‘INFORMATION_SCHEMA.SESSION_VARIABLES’ feature is disabled; see the documentation for ‘show_compatibility_56’ This is a common issue that…
This is a common issue for Ubuntu users when they just finish installing MySQL on their environments. When they try to login using:
1 |
$ mysql -u root |
…
This is a simple tutorial to show you how to clear a database without dropping it completely.
1 2 3 4 5 6 7 8 9 10 11 12 |
# Create a sql file with all the DROP TABLE queries for each table $ mysql -uUSER -pPASSWORD -e "SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'YOURDATABASE';" > drop.tables.sql # Remove the first line of the file $ tail -n +2 drop.tables.sql > drop.tables.sql.tmp && mv drop.tables.sql.tmp drop.tables.sql # Disable Foreign Key Checks $ echo 'SET FOREIGN_KEY_CHECKS = 0;' | cat - drop.tables.sql > tmp && mv tmp drop.tables.sql $ echo 'SET FOREIGN_KEY_CHECKS = 1;' | cat - drop.tables.sql >> tmp && mv tmp drop.tables.sql # Execute your SQL file $ mysql -uUSER -pPASSWORD YOURDATABASE < drop.tables.sql |
Search string in MySQL database In this tutorial I will show you how to search a specific string in a whole MySQL Database. Let’s…
Logrotate for MySQL Database Backup These are the steps to create an automatic backup process which will create a backup file daily and rotate…
Sometimes we need to duplicate a large mysql database and it can take too long to do it via phpmyadmin, sequel pro, and others.…