March 2009 Archives
1. 테이블에 새로운 컬럼 추가
alter table tablename add column [추가할 컬럼명] [추가할 컬럼 데이타형]
2. 테이블에 컬럼타입 변경하기
alter table tablename modify column [변경할 컬럼명] [변경할 컬럼 타입]
3. 테이블에 컬럼이름 변경하기
alter table tablename change column [기존 컬럼명] [변경할 컬럼명] [변경할 컬럼타입]
4. 테이블에 컬럼 삭제하기
alter table tablename drop column [삭제할 컬럼명]
5. 테이블컬럼에 인덱스 주기
alter table tablename add index 인덱스명(인덱스를 줄 컬럼1 , 인덱스를 줄 컬럼2, ... )
6. 테이블컬럼에 인덱스 삭제하기
alter table tablename drop index 인덱스명;
7. 테이블에 Primary Key 만들기
alter table tablename add primary key (키를 줄 컬럼명1 , 키를 줄 컬럼명2, ...)
8. 테이블에 Primary Key 삭제하기
alter table tablename drop primary key;
9. 테이블명 바꾸기
alter table 기존테이블명 rename 새로운테이블명
10. 인덱스 생성
CREATE [UNIQUE] INDEX index_name ON tbl_name (col_name[(length]),... )
11. 인덱스 삭제
DROP INDEX index_name
Tomcat6.0, Mysql Server version: 5.0.77-1 (Debian)
1. Error
// Cannot connect to MySQL server on localhost:3307. Is there a MySQL server running on the machine/port you are trying to connect to? (java.security.AccessControlException)
2. Solution
edit this file and add bold line like below.
debian:/var/lib/tomcat6/conf/policy.d/04webapps.policy
1. Error
Communication failure during handshake. Is there a server running on 127.0.0.1:3307?
2.Solution
replace your JDBC driver .
in my case below.
"mysql-connector-java-5.1.7-bin.jar" download link...
http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.7.tar.gz/from/http://mysql.byungsoo.net/
:)
1. Error
// Cannot connect to MySQL server on localhost:3307. Is there a MySQL server running on the machine/port you are trying to connect to? (java.security.AccessControlException)
2. Solution
edit this file and add bold line like below.
debian:/var/lib/tomcat6/conf/policy.d/04webapps.policy
permission java.io.FilePermission "${java.io.tmpdir}/-", "read,write,delete";
// Cannot connect to MySQL server on localhost:3307. Is there a MySQL server running on the machine/port you are trying to connect to? (java.security.Acc
permission java.net.SocketPermission "127.0.0.1:3307", "connect,resolve";
};
1. Error
Communication failure during handshake. Is there a server running on 127.0.0.1:3307?
2.Solution
replace your JDBC driver .
in my case below.
WEB-INF/lib/mm.mysql-2.0.14-bin.jar -> mysql-connector-java-5.1.7-bin.jar
"mysql-connector-java-5.1.7-bin.jar" download link...
http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.7.tar.gz/from/http://mysql.byungsoo.net/
:)