티스토리 뷰

728x90

InnoDB 가능 여부 확인

출처 : Linux DB - innodb 설치 및 옵션 - FAQ.호스트웨이

mysql> show variables like 'have_innodb';
+---------------+----------+
| Variable_name | Value    |
+---------------+----------+
| have_innodb   | DISABLED |
+---------------+----------+
1 row in set (0.01 sec)

MySQL 옵션 변경

MySQL 환경 변수 파일을 열어서 skip-innodb 부분에 샵(#)을 추가해서 주석으로 만들고 MySQL 재시작 한다.

# cd /etc
# cp my.cnf my.cnf.old
# vi my.cnf

my.cnf 수정

# skip-innodb

MySQL 재시작

# service mysql restart
Shutting down MySQL... SUCCESS! 
Starting MySQL. SUCCESS!

MySQL 옵션 변경 확인

mysql> show variables like 'have_innodb';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_innodb   | YES   |
+---------------+-------+
1 row in set (0.02 sec)

테이블 스토리지 엔진을 MyISAM에서 InnoDB로 수정

출처 : Mysql 테이블 InnoDB 방식으로 변경하기(How to change Mysql table information MyISAM to InnoDB)

mysql> alter table `test_table1` engine=InnoDB;
Query OK, 0 rows affected (0.04 sec)
Records: 0  Duplicates: 0  Warnings: 0

테이블 스토리지 엔진을 MyISAM만 조회해서 InnoDB로 수정 스크립트 추출

SELECT CONCAT('ALTER TABLE `', TABLE_NAME, '` ENGINE=InnoDB;') 
  FROM INFORMATION_SCHEMA.TABLES 
 WHERE TABLE_SCHEMA = 'bluexmas_db' 
   AND ENGINE='MyISAM'
Records: 0 Duplicates: 0 Warnings: 0

Auto Commit 설정 변경

출처 : MySQL - AUTOCOMMIT 여부 확인하기 - 민서네집 - Tistory

-- AUTOCOMMIT 여부 확인
SELECT @@AUTOCOMMIT;
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함