Database/MySQL

윈도우에서 MySQL zip파일로 설치하기

xProgrammer 2018. 3. 13. 18:03

다운로드

https://dev.mysql.com/downloads/file/?id=474262


압축해제

C:\Portable\MySQL\mysql-5.6.39-win32


환경설정

C:\Portable\MySQL\mysql-5.6.39-win32\mysql-5.6.39-win32.ini

[client]
character-set=utf8

[mysql]
default-character-set=utf8

[mysqld]
#skip-grant
# set basedir to your installation path
basedir=C:/Portable/MySQL/mysql-5.6.39-win32
# set datadir to the location of your data directory
datadir=C:/Portable/MySQL/mysql-5.6.39-win32/data
init_connect=SET collation_connection=utf8_unicode_ci
init_connect=SET NAMES utf8
#default-character-set=utf8
character-set-server=utf8
collation-server=utf8_unicode_ci
#default_table_type = InnoDB


시작스크립트

"C:/Portable/MySQL/mysql-5.6.39-win32/bin/mysqld" --defaults-file="C:/Portable/MySQL/mysql-5.6.39-win32/mysql-5.6.39-win32.ini" --console 


종료스크립트

"C:/Portable/MySQL/mysql-5.6.39-win32/bin/mysqladmin" -u root -p shutdown


root비밀번호설정

C:\Portable\MySQL\mysql-5.6.39-win32\bin mysql -u root -p mysql

mysql > update user set password=password('변경할비밀번호') where user='root'; flush privileges