MySQL

Just finished migrating my website from SQLite to MySQL. What a rush. (lol) It was actually not as bad as I thought. A lot of sed, grep and other sorcery involved; especially in transforming of SQLite statements to MySQL. Some quick commands I used: sqlite techish.db .dump > production_2018-08-23.dump.sql I found that it used quotes…

Read More WordPress SQLite to MySQL Migration Complete

If the Forgot password option doesn’t work for you (which it really should), then you can change the password of your self-hosted WordPress login. Check the contents of wp-config.php for the database login. Use that login information for MySQL login. define(‘DB_NAME’, ‘wpdatabase’); define(‘DB_USER’, ‘wpdbuser’); define(‘DB_PASSWORD’, ‘wpdbpassword’); Replacing DB_USER and DB_NAME from that command with the…

Read More Change WordPress Password using MySQL

There is a function in MySQL that will calculate the number of days between two given dates:  datediff Example mysql> select datediff(‘2014-06-09′,’2014-07-07’); +———————————————-+ | datediff(‘2014-06-09′,’2014-07-07′) | +———————————————-+ | -28 | +———————————————-+ 1 row in set (0.00 sec) Calculate Days Between Now and Specific Date mysql> select datediff(now(),’2014-07-01′); +——————————+ | datediff(now(),’2014-07-01’) | +——————————+ | 6 |…

Read More Calculate Date Differences in MySQL

Here’s a simple way to determine the date/time a database was created in MySQL: SELECT create_time FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = ‘DB_NAME’ mysql> select create_time from information_schema.tables where table_schema=’foo’; +———————+ | create_time | +———————+ | 2013-03-01 10:42:34 |

Read More Determine a MySQL Database Creation Date