MySQL - Move Data Files To New Location (Windows)

ben himself's picture

After setting up MySQL, I realized that I put my data files on the C drive.  Since I don't want database growth to end up taking down the entire OS, I had to move them.  My struggles consumed a couple of hours, so I wanted to clear up and document the process.

Default Database Files

MySQL (5.7) stores the default configuration files at:
C:\ProgramData\MySQL\MySQL Server 5.7\

To verify where your files are stored, simply run this MySQL script:
 

select @@datadir;

Tags: 

PowerShell With Uptime - Getting Days Only

ben himself's picture

There is a handy and free tool to check your system's uptime called "Uptime".  (Clever, no?)  It can be downloaded at http://uptimeexe.codeplex.com.

While it is very easy to use (just navigate to it in a command window and type "uptime"), it doesn't give much of an option for formatting the output to include only the days.  So, a simple workaround is to use some "replace" commands within PowerShell and only output the number of days.  Here's how:

Tags: 

Removing SSMS Boost

ben himself's picture

SSMS Boost is an add-on for SQL Server Management Studio.  I used it for quite some time but I got tired of using it as freeware.  The reason SSMSBoost as freeware didn't work for me was because they require that you continually re-download the new version and re-register every 120 days, otherwise it renders your existing version useless.  That process gets tedious, at least I think it does.  I want my tools to serve me, not the other way around.

Tags: 

Post date
Flickr Searching Sunday, June 18, 2017 - 18:44
PowerShell - Arrays Friday, May 12, 2017 - 20:19
One Off Thought - Back to Top Monday, February 20, 2017 - 16:31
TempDB Reporting Incorrect File Size Friday, January 20, 2017 - 23:24
SQL Server - Disabled User Account Overrides AD Group Authorization! Wednesday, December 28, 2016 - 18:57
Asus Q301L (Sonic Master) - fn (function) Key Stuck "On" Tuesday, December 20, 2016 - 19:28
SQL Server Maintenance Plan Backups Failing On Secondary Replica in High Availability Environment Friday, December 2, 2016 - 00:11
TSQL - Make Excel Link In Output Thursday, August 4, 2016 - 20:59
TSQL - Get All Queries Currently Running Thursday, August 4, 2016 - 18:47
PowerShell - Update All SQL Services To Restart On Failure Thursday, August 4, 2016 - 18:36