MySQL 5.7.17 - 수동설치

Database 2017.03.04 19:40 Posted by 파란크리스마스

MySQL 5.7.17 - 수동설치

출처 : 취향창고 :: [윈도우10]mysql 5.7.10 수동 설치기

환경파일 생성(mysql.ini)

[mysqld]
# port
# port=3306
# set basedir to your installation path
basedir=C:/mysql/mysql-5.7.17-winx64
# set datadir to the location of your data directory
datadir=C:/mysql/mysql-5.7.17-winx64/data

character-set-server=utf8 
collation-server=utf8_general_ci 

#default-storage-engine = InnoDB
#default-table-type = InnoDB
transaction-isolation = READ-COMMITTED

[mysql] 
no-auto-rehash
default-character-set=utf8 

[client] 
default-character-set=utf8

초기화

bin\mysqld --initialize

root 계정 암호 초기화

권한 없이 mysql 서버 실행

bin\mysqld --skip-grant-tables

root 계정 암호 설정

C:\mysql\mysql-5.7.17-winx64>bin\mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql
Database changed
mysql> update user set authentication_string = password('sql') where user = 'root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 1

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

localhost용 root 계정 등록

C:\mysql\mysql-5.7.17-winx64>bin\mysql -u root -p
Enter password: ***
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.17

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> alter user 'root'@'localhost' identified by 'sqldba';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> quit
Bye

mysql 서비스 등록

bin\mysqld.exe --install "MySQL 5.7.17" --defaults-file=C:\mysql\mysql-5.7.17-winx64\mysql.ini

mysql 서비스 삭제

bin\mysqld.exe --remove "MySQL 5.7.17"
저작자 표시
신고


 

티스토리 툴바