Skip to content

Instantly share code, notes, and snippets.

@hirnsturm
hirnsturm / drop_all_tables_mysqldump.sh
Created Dec 8, 2021
Drop all tables in MySQL with mysqldump
View drop_all_tables_mysqldump.sh
#
# 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 Nov 29, 2017
Which php extensions are installed?
View php_extension_test.php
<?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 = [