|
|
麻烦翻译一下,下面这段文章:xhan
+ a# R* ~- I9 @" i
2 Z7 ?% I0 N$ w2 ]+ v-
- z/ ?2 }; ]9 _! H0 ^ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######0 x& n5 |% b6 L1 Y# h: T& w
+ ?% Q8 X/ F; U" y1 q. X- J- ### What we need ###
) p5 G+ I3 z2 o8 @; N! N% Z& M; V o - Naturally, we will need a MySQL server to store the data for us, this document ' _, o- _: R5 n
- will not explain how this can be done - there are documents out there for the
M+ q# a. a: } - interested. The requirements include a (empty) database for TeamSpeak to use6 a0 N V) c0 m
- and a user account (username + password) that has the permissions to do stuff2 z' v, w4 f5 d
- with the database. Additionally, you will need a vendor library installed on the
4 P* j' G1 f' O - local machine, this came with my MySQL install.
! Z2 j% j* B" M5 w2 N - These instructions will not tell you how you might transfer your data from the
2 S- V; f/ j3 t - SQLite database to the MySQL database, we start with a clean and empty MySQL4 C& C& X% F( P% N9 q+ ]5 y/ y
- database.4 N$ ]. T3 x# {' k9 ]- A
- Some users have reported ways to import a SQLite database into MySQL, but at
$ s7 q% e# C: ^% B - the time of writing, there are still too many issues - check the current status& @# B3 g( N, Q9 H+ z
- in the TeamSpeak forums if you are interested." k4 c; C4 ]4 G( [. E8 m
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* t; c" M9 W7 K! f9 O8 D - Borland was used. This driver can only interface with the client library that
, F* l1 o+ X% A1 k - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this2 {) ^6 f5 S: u5 t6 E9 Y
- client library - basically all you have to do is to use a 3.x client library as 6 s8 e; ]* q$ A7 n/ ~8 h7 M
- "VendorLib" and a 4.x database to connect to.- h* X' Z" D' c9 x, m U
- If you need more info about dbExpress, you can contact Borland.
! i G* N2 f0 r# t# m) ~ - & N: ~: V$ }; ]
- ### Doing the work ###
- S A1 r, W, ~& W" e - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
4 Z% }- j2 P* E6 h; x4 v - the perquisites right, just open your server.ini file, and add this section at
- V5 `2 y$ \" S8 w) s' s: y - the end:
* \0 e8 I( G. m) r4 d - ---cut here---- I n% w1 X% B
- [DBEXPRESS]2 o% M B% U+ @4 T% V
- sqldir=mysql_sql: i- J1 x& _+ y# P' j* s5 T0 s
- Drivername=mysql
1 ]7 i9 x0 a- y4 h: l' H, J( a - Database=Your_Database_Name_Here9 y5 g+ t" V. v7 S# |
- Hostname=The_PC_the_MySQL-Server_is_on" \) ]# x/ e: n1 M4 Q
- User_name=User_name_on_the_MySQL-Server8 d9 C& e1 }7 V3 X- J( u$ f- T! h% f
- Password=Password_to_go_with_above_user_name
: Z" @9 I7 R* T1 t$ ?" X - GetDriverFunc=getSQLDriverMYSQL
5 Y4 G6 W) A1 N! F+ @2 J( M6 H - VendorLib=path_pointing_at_your_mysql_vendor_lib* U+ J2 {! R+ c. A
- LibraryName=path_to_libsqlmy_libary) L; }& z, Y* B% w7 v( q
- Active=1
- c3 G" j2 K8 g - ---cut here--- \0 \+ D- H4 t5 M F' e. O
- In my environment (a linux box with a MySQL server running locally) I have:
! v& R+ o# ~* o5 A) \ - ---example---; N( [0 p% H0 c
- [DBEXPRESS]. L! z: P. Z V& L3 k, R1 G
- sqldir=mysql_sql
+ _8 `% z4 j6 _. D/ v - Drivername=mysql/ j' Y" h& ^* N5 I
- Database=test, Q3 p, w9 G" f8 c" L
- Hostname=localhost/ B8 _6 d! V5 [$ F, g' [2 f
- User_name=testuser
! D- ?2 S- r/ {6 U% d/ V - Password=my_password
9 I$ d% i1 T* c8 ^" u4 N - GetDriverFunc=getSQLDriverMYSQL
9 s5 h% J6 z O' @; C! h5 X/ b - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, G" ^( J4 p# k# p7 |7 c
- LibraryName=./libsqlmy.so
/ e' ]' g" S3 a- U: X k! d5 ? - Active=1& {) u& @1 k# p( }
- ---example---
" J( s' E7 e: x9 j* t
0 }5 X. D+ w+ U1 u4 h( [- On a windows box, also running the MySQL server locally, it would be:$ i3 e) N' g; a" b5 r3 }/ ]
- ---example---
$ J: ], ]7 ?3 b - [DBEXPRESS]& M, j9 u1 w& ]) p$ J( u6 J0 @
- sqldir=mysql_sql
6 N8 o+ Y5 o" s! S. h; A- S - Drivername=mysql+ ^9 o8 n, K4 X+ W$ o3 p0 I7 h" |
- Database=test- [- L, V, ]/ C0 W5 w3 |
- Hostname=127.0.0.1
( _5 ~8 c; P ~) q- Y* `( Z - User_name=testuser/ m% \- Q! V$ [/ U' y
- Password=my_password
( |- Y8 P8 H/ O8 ?9 V* [/ m - GetDriverFunc=getSQLDriverMYSQL
( r$ C& L* ?7 {0 l7 g8 j1 X, l - VendorLib=libmysql.dll
0 Z) j* \+ S/ |, U0 l9 w; d0 C( a+ w - LibraryName=dbexpmysql.dll) Z+ m* }1 ^5 j5 Z
- Active=1
1 @* W! G8 t4 ^! _) [ - ---example----
2 \# z& f2 P. ^5 s7 @0 [- \% R - - written 02.03.04 by pwk.linuxfan. i+ G B- X, I! e( F
, U5 ~ W) v& l/ u3 G% U2 O5 m( c
复制代码 |
|