title: How to change MySQL data directory on windows?
body: <p>I went to this location C:\ProgramData\MySQL\MySQL Server 5.6 to find my.ini, then I modified the datadir to:
  datadir=C:/ProgramData/MySQL/MySQL Server 5.6/Dataz</p>
  
  <p>I only added the letter z to the original path, then I created the dataz folder in the MySQL Server 5.6 directory.</p>
  
  <p>then i closed and opened mysql to restart it</p>
  
  <p>I haven't been able to make it work. What am i missing?                                                                                                                                                                              </p>
  
  <p>2 hours later...</p>
  
  <p>I wasn't restarting mysql server properly, I was only clicking the mysql command client close button. someone told that I had to restart the computer for the changes to take effect, if didn't know how to restart mysql server properly. </p>
  
  <p>After doing this the dataz folder had new files. this is new because I wasn't be able to create this files before They appeared after I restart the computer.</p>
  
  <p>Now, MySQL command client shows an error and closes itself after I enter my password. I can't see the error because the error is shown for one second or less</p>