When you use the InnoDB (transactions-capable) storage engine, you can resize InnoDB data and log files by following the instructions below.
Resizing the data files.
The easy way is to first use mysqldump to dump the data from all InnoDB tables. Then shut down MySQL properly and recreate the InnoDB data and log files. As last step, just restore data from the dump files back into MySQL.
Resizing the log files.
First do a proper MySQL shut down. Backup the log files and move them away from the logs directory, then change log file size settings and finally restart MySQL. Please note that if you do not move log files away, InnoDB will refuse to start and will complain about the log file size.