1, First of all, backup your data using mysqldump.
2, If you install Mysql Server from official package, you can do it by running program MySQLINstanceConfig.exe from bin directory of your server.
3, Import data
Second solution (not recommended, but works on same machine)
1, Stop Mysql server.
2, Copy data from your data directory to your new directory
3, Open my.cnf file (In my case "C:\ProgramData\MySQL\MySQL Server 5.5\my.ini")
4, find row like datadir="C:\ProgramData\MySQL\MySQL Server 5.5\data\" and change path to your new location
5, Start your server