* db 파일 물리적 위치
mysql> show variables like 'datadir';
* db 파일 물리적 위치
mysql> show variables like 'datadir';
참조:http://stackoverflow.com/questions/14432299/should-etc-my-cnf-be-set-to-add-character-set-server-utf8-and-default-character
/etc/my.cnf.
|
츨처:https://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
mysql> create table test3 (a int primary key, b int ,c int);
Query OK, 0 rows affected (0.02 sec)
mysql> INSERT INTO test3 (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;
Query OK, 1 row affected (0.01 sec)
mysql> select * from test3;
+---+------+------+
| a | b | c |
+---+------+------+
| 1 | 2 | 3 |
+---+------+------+
1 row in set (0.00 sec)
mysql> INSERT INTO test3 (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;
Query OK, 2 rows affected (0.00 sec)
mysql> select * from test3;
+---+------+------+
| a | b | c |
+---+------+------+
| 1 | 2 | 4 |
+---+------+------+
1 row in set (0.00 sec)
mysql> INSERT INTO test3 (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;
Query OK, 2 rows affected (0.00 sec)
mysql> select * from test3;
+---+------+------+
| a | b | c |
+---+------+------+
| 1 | 2 | 5 |
+---+------+------+
1 row in set (0.00 sec)
출처:http://blog.mongee.net/7
select table_name,(data_length)/(1024*1024) as 'DATA(MB)',(index_length)/(1024*1024) as 'INDEX(MB)' from information_schema.tables where table_name like '%_TBL';
출처:
http://www.egovframe.go.kr/wiki/doku.php?id=egovframework:rte:psl:transaction#configuration
http://www.egovframe.go.kr/wiki/doku.php?id=egovframework:rte:psl:transaction:declarative_transaction_management
* xml 정의
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/> </bean> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="dbc:mysql://db2:1621/rte"/> <property name="username" value="rte"/> <property name="password" value="xxx"/> <property name="defaultAutoCommit" value="false"/> </bean>
(datasource.xml)
* 사용
@Transactional
public class Foo {
insert();
delete();
load_data();
}
설치 후 로그인 때 에러
Fatal error: Maximum execution time of 30 seconds exceeded in ... class-http.php on line 900
CREATE TABLE `test2` (
`col1` int(11) DEFAULT NULL,
`col2` int(11) DEFAULT NULL,
`ins_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
또는
CREATE TABLE `test2` (
`col1` int(11) DEFAULT NULL,
`col2` int(11) DEFAULT NULL,
`ins_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
http://stackoverflow.com/questions/14797194/cygwin-ls-command-not-found
http://blog.naver.com/PostView.nhn?blogId=netrance&logNo=110159806133