MySQL 5.7 이 릴리즈 된지도 오래 지났다. 인기 있는 데이터베이스 시스템이라서 그런지 현장에서 많이 쓰이는 거 같다. 무엇보다도 Replication 기능의 향상이 많은 사용자를 끌어들이는 느낌이다. 이 글에서는 개인적으로 MySQL 5. 7 를 사용하면서 느낀 변화에 대해서 기술하고자 한다. 변화에 대한 기술은 MySQL 5.6 과 비교한 것이다. 데이터베이스 초기화 기존에는 mysql_install_db 를 사용했지만 이제는 mysqld 에 옵션으로 –initialize 를 주고 실행하면 시스템 데이터베이스와 테이블, innodb 저장소등을 만들어준다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
]# /opt/mysql/bin/mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql 2018-02-08T14:20:14.336639Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead. 2018-02-08T14:20:14.336744Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2018-02-08T14:20:14.456328Z 0 [Warning] option 'innodb-autoextend-increment': unsigned value 10485760 adjusted to 1000 2018-02-08T14:20:14.464747Z 0 [Warning] InnoDB: Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed. 2018-02-08T14:20:14.464756Z 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html 100 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2018-02-08T14:21:31.006740Z 0 [Warning] InnoDB: New log files created, LSN=45790 2018-02-08T14:21:31.453291Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2018-02-08T14:21:31.529545Z 0 [ERROR] unknown variable 'log_bin_basename=/opt/dbstorage/mysql/binlog/localhost-01-bin' 2018-02-08T14:21:31.529560Z 0 [ERROR] Aborting |
기존의 MySQL 5.6 에서 사용하는 my.cnf 파일을 가져다 초기화를 하면 위와 같이 warining […]