The configuration covered only apply to testing environment.
Instructions
-
Download portable version from mysql official site

-
Extract to path assume the path to be
Q:\\tools\\mysql\\mysql\\app
-
Add config file
my.cnf1 2 3 4 5 6 7 8 9 10 11 12 13[mysqld] basedir = "q:\\tools\\mysql\\mysql\\app" datadir = "q:\\tools\\mysql\\mysql\\data" lower_case_table_name=1 character-set-client-handshake = FALSE character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci [client] default-character-set = utf8mb4 [mysql] default-character-set = utf8mb4 -
Add mysql binary path to system path
1 2set t_mysql_bin=q:\tools\mysql\mysql\app\bin set path=%t_mysql_bin%;%PATH% -
Add init.txt for initialize purpose, such as root password setup
1SET PASSWORD FOR 'root'@'localhost' = PASSWORD('Abcd1234'); -
create run script
if initialise please run below script1mysqld --defaults-file="q:\tools\mysql\mysql\my.cnf" --initialize --init-file="q:\tools\mysql\mysql\init.txt"if run existing application
1mysqld --defaults-file="q:\tools\mysql\mysql\my.cnf" -
If windows throw missing
MSVCR120.dllexception, you may flow question to download windows vcrdist and install it.