This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| TABLE_NAME, TABLE_COMMENT | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE | |
| TABLE_SCHEMA=DATABASE() | |
| AND TABLE_TYPE='BASE TABLE' | |
| ORDER BY | |
| TABLE_NAME | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| CONCAT('DROP TABLE `', t.table_name,'`;') drop_sql | |
| FROM information_schema.TABLES t | |
| WHERE | |
| t.table_schema = DATABASE() | |
| AND t.table_name LIKE 'wp\_%' | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| header('Content-Type: text/plain'); | |
| /** | |
| * Fix to: Maximum execution time of 30 seconds exceeded. | |
| * Loop can fail in-between otherwise. | |
| */ | |
| set_time_limit(0); | |
| $mysqli = new MySQLi('localhost', 'USERNAME', 'PASSWORD', 'test'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SHOW STATUS; | |
| SHOW PROCESSLIST; | |
| SHOW FULL PROCESSLIST; | |
| KILL PROCESS 6607; | |
| FLUSH LOGS; | |
| FLUSH PRIVILEGES; | |
| FLUSH HOSTS; | |
| FLUSH TABLES; | |
| FLUSH STATUS; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://stackoverflow.com/questions/17581102/setting-environment-variable-using-htaccess | |
| # print_r($_SERVER); | |
| # Sets anything | |
| SetEnv SERVER_KEY "qwerty" | |
| SetEnv ANY_NAME "Dummy Name" | |
| # Overwrites | |
| SetEnv PATH "/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@server [/tmp]# mysqld --print-defaults | |
| mysqld would have been started with the following arguments: | |
| --innodb_file_per_table=1 --tmp_table_size=128M --max_heap_table_size=128M --query_cache_size=64M --thread_cache_size=64 --key_buffer_size=32M --max_allowed_packet=16M --table_cache=1024 --table_definition_cache=8192 --innodb_buffer_pool_size=128M --innodb_flush_method=O_DIRECT --open_files_limit=16384 --max_connections=100 --max_user_connections=25 --wait_timeout=20 --myisam_sort_buffer_size=2M --thread_concurrency=4 --slow_query_log=1 --log-output=TABLE --long_query_time=20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT CONCAT('DROP TABLE `', TABLE_NAME, '`;') DROP_QUERY FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME LIKE '\_%'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Connects to XAMPP's cdcol database | |
| CREATE SERVER server1 | |
| FOREIGN DATA WRAPPER mysql | |
| OPTIONS (USER 'root', PASSWORD 'toor', HOST 'localhost', PORT 3306, DATABASE 'cdcol'); | |
| USE test; | |
| CREATE TABLE `cds` ( | |
| `titel` VARCHAR(200) DEFAULT '' NOT NULL, | |
| `interpret` VARCHAR(200) DEFAULT '' NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| header('Content-Type: text/plain'); | |
| # Trims .ini files | |
| $lines = file('C:/xampp/php/php.ini', FILE_IGNORE_NEW_LINES); | |
| $trimmed = array(); | |
| foreach($lines as $l => $line) | |
| { | |
| if(!preg_match('/^[;|#]/', $line)) |