Skip to content

Instantly share code, notes, and snippets.

@hirnsturm
hirnsturm / drop_all_tables_mysqldump.sh
Created December 8, 2021 12:05
Drop all tables in MySQL with mysqldump
#
# Source: https://tableplus.com/blog/2018/08/mysql-how-to-drop-all-tables.html
#
# First, disable foreign key check:
echo "SET FOREIGN_KEY_CHECKS = 0;" > ./temp.sql
# Then dump the db with no data and drop all tables:
mysqldump --add-drop-table --no-data -u root -p db_name | grep 'DROP TABLE' >> ./temp.sql
@hirnsturm
hirnsturm / php_extension_test.php
Created November 29, 2017 15:02
Which php extensions are installed?
<?php
/**
* This script checks whether given php extensions on the current system exists.
*
* @author Steve Lenz <steve.lenz@xima.de>
*/
/** @var array $extensions List of extensions to be tested */
$extensions = [