ViewCVS 에 MySQL 연동 문의
글쓴이: 단풍 / 작성시간: 화, 2005/06/07 - 7:57오후
OS : RHEL4
ViewCVS 버전은 1.0-dev 개발 버전입니다.
http://cvs.sourceforge.net/viewcvs.py/viewcvs/viewcvs/
ViewCVS 에 MySQL 연동 할려면 어떻게 하나요?
제가 작업 내용은 아래와 같습니다.
--- make-database.orig 2005-05-31 04:45:42.000000000 +0900 +++ make-database 2005-06-01 17:34:46.000000000 +0900 @@ -38,7 +38,7 @@ DROP TABLE IF EXISTS branches; CREATE TABLE branches ( - id mediumint(9) DEFAULT '0' NOT NULL auto_increment, + id mediumint(9) NOT NULL auto_increment, branch varchar(64) binary DEFAULT '' NOT NULL, PRIMARY KEY (id), UNIQUE branch (branch) @@ -69,7 +69,7 @@ DROP TABLE IF EXISTS descs; CREATE TABLE descs ( - id mediumint(9) DEFAULT '0' NOT NULL auto_increment, + id mediumint(9) NOT NULL auto_increment, description text, hash bigint(20) DEFAULT '0' NOT NULL, PRIMARY KEY (id), @@ -78,7 +78,7 @@ DROP TABLE IF EXISTS dirs; CREATE TABLE dirs ( - id mediumint(9) DEFAULT '0' NOT NULL auto_increment, + id mediumint(9) NOT NULL auto_increment, dir varchar(255) binary DEFAULT '' NOT NULL, PRIMARY KEY (id), UNIQUE dir (dir) @@ -86,7 +86,7 @@ DROP TABLE IF EXISTS files; CREATE TABLE files ( - id mediumint(9) DEFAULT '0' NOT NULL auto_increment, + id mediumint(9) NOT NULL auto_increment, file varchar(255) binary DEFAULT '' NOT NULL, PRIMARY KEY (id), UNIQUE file (file) @@ -94,7 +94,7 @@ DROP TABLE IF EXISTS people; CREATE TABLE people ( - id mediumint(9) DEFAULT '0' NOT NULL auto_increment, + id mediumint(9) NOT NULL auto_increment, who varchar(32) binary DEFAULT '' NOT NULL, PRIMARY KEY (id), UNIQUE who (who) @@ -102,7 +102,7 @@ DROP TABLE IF EXISTS repositories; CREATE TABLE repositories ( - id mediumint(9) DEFAULT '0' NOT NULL auto_increment, + id mediumint(9) NOT NULL auto_increment, repository varchar(64) binary DEFAULT '' NOT NULL, PRIMARY KEY (id), UNIQUE repository (repository)
shell> ./make-database
This script creates the database and tables in MySQL used by the ViewCVS
checkin database. You will be prompted for: database user, database user
password, and database name. This script will use mysql to create the
database for you. You will then need to set the appropriate parameters
in your viewcvs.conf file under the [cvsdb] section.
MySQL User: 유저
MySQL Password: 비빌번호
ViewCVS Database Name [default: ViewCVS]: ViewCVS
Database created successfully.
shell> mysql ViewCVS Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1297291 to server version: 4.1.11-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show tables; +-------------------+ | Tables_in_ViewCVS | +-------------------+ | branches | | checkins | | descs | | dirs | | files | | people | | repositories | | tags | +-------------------+ 8 rows in set (0.00 sec) mysql>
shell> ./cvsdbadmin Usage: ./cvsdbadmin <command> [arguments] Preforms administrative functions for the CVSdb database Commands: rebuild <repository> rebuilds the CVSdb database for all files in the repository update <repository> updates the CVSdb database for all unrecorded commits shell> ./cvsdbadmin rebuild /home/CVS Traceback (most recent call last): File "./cvsdbadmin", line 122, in ? db = cvsdb.ConnectDatabase() File "/home/web/junghyun/project/lib/cvsdb.py", line 666, in ConnectDatabase gCheckinDatabase.Connect() File "/home/web/junghyun/project/lib/cvsdb.py", line 76, in Connect self.db = dbi.connect( File "/home/web/junghyun/project/lib/dbi.py", line 66, in connect return MySQLdb.connect(host=host, user=user, passwd=passwd, db=db) File "/usr/lib/python2.3/site-packages/MySQLdb/__init__.py", line 64, in Connect return apply(Connection, args, kwargs) File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 116, in __init__ self._make_connection(args, kwargs2) File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 41, in _make_connection apply(super(ConnectionBase, self).__init__, args, kwargs) TypeError: connect() argument 3 must be string, not int
viewcvs.conf db 부분
#--------------------------------------------------------------------------- [cvsdb] enabled = 1 host = localhost database_name = ViewCVS user = 유저 passwd = 비밀번호 readonly_user = 유저 readonly_passwd = 비밀번호 row_limit = 1000
위와 같이 에러가 나는대 MySQL 4.1.x 에 ViewCVS 연동해 보신분 계신가요?
Forums:
댓글 달기