|
|
麻烦翻译一下,下面这段文章:xhan / |- E0 N" _- ~
. X, r, d# u' h+ ^$ N. M. W% y
- $ Z8 U6 E0 y( i/ _- J* ]
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
, Y9 B/ u) O c+ v/ X7 I. _
$ b$ b3 N8 j9 I$ H: W3 C! H9 u- ### What we need ###
6 Y$ t2 d6 b1 a; l8 t - Naturally, we will need a MySQL server to store the data for us, this document
6 r1 ]' b5 h' |3 ^! a - will not explain how this can be done - there are documents out there for the , l0 q- D& m1 m$ Q
- interested. The requirements include a (empty) database for TeamSpeak to use
: F0 F% U; o0 Q- [9 l - and a user account (username + password) that has the permissions to do stuff
& s \# ?4 P \$ f; @' h# o1 t - with the database. Additionally, you will need a vendor library installed on the# V/ I$ M" ]1 h6 z$ _
- local machine, this came with my MySQL install.
" N) O& y* w, M( D9 n9 a - These instructions will not tell you how you might transfer your data from the% D5 Q. ?$ C0 y
- SQLite database to the MySQL database, we start with a clean and empty MySQL
1 C. L* b# x7 l# N2 S/ ?. w - database.
* n( \. t/ ~, u/ C' J - Some users have reported ways to import a SQLite database into MySQL, but at
7 B% w$ ~; l& D - the time of writing, there are still too many issues - check the current status
( k; }& c4 H7 m: {! @1 t - in the TeamSpeak forums if you are interested.& o) k1 |% V- v1 i p! Z
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from% P+ Q0 ]4 i' N2 \8 C" e
- Borland was used. This driver can only interface with the client library that
" K9 K ^9 p7 N, m; Q - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
7 Z9 @( r: H; ?1 y( P# U6 r H - client library - basically all you have to do is to use a 3.x client library as 7 @# O3 C0 h; N6 E7 B/ |
- "VendorLib" and a 4.x database to connect to.
! Y5 o1 h% l7 B* U" z" @2 P9 { - If you need more info about dbExpress, you can contact Borland.# s+ m& H3 j6 v( A: x0 r
- . A; @& j5 E/ M: G# B* O6 R( r
- ### Doing the work ###
# T! R" F( D4 x1 l - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
: H) K! x4 @8 e. z5 a - the perquisites right, just open your server.ini file, and add this section at
3 ]& E, X# L, {. N - the end:
* b0 \5 |2 u8 ] |7 c6 |! [ - ---cut here---3 e, z2 A, u7 V A! h: k
- [DBEXPRESS]
9 z" i% R' G" Y. [ - sqldir=mysql_sql( d1 l9 u: |2 @6 |. G
- Drivername=mysql
7 N1 v6 R' `. H# d: N, b - Database=Your_Database_Name_Here3 Y9 A" K2 l1 r, t
- Hostname=The_PC_the_MySQL-Server_is_on
4 T$ Q. w/ P' [* B6 ] - User_name=User_name_on_the_MySQL-Server- I. c( G, b* ^1 g/ I8 d r
- Password=Password_to_go_with_above_user_name
. q7 U- C; I8 C6 x. ~+ o/ M - GetDriverFunc=getSQLDriverMYSQL @2 y- @6 n# `) l% X- I" t
- VendorLib=path_pointing_at_your_mysql_vendor_lib( h3 x1 }% n1 `( s( V
- LibraryName=path_to_libsqlmy_libary
) t* m; B; m/ l - Active=1
: K& ]3 s0 z1 C' t7 J; A - ---cut here---- L9 m! q, n6 e
- In my environment (a linux box with a MySQL server running locally) I have:! l5 E5 L: z, E
- ---example---
8 c- Z9 Q& A; e- b: c2 o - [DBEXPRESS]
3 x: B9 w) m7 @ - sqldir=mysql_sql
9 N, V6 { E: p3 Q7 u - Drivername=mysql
6 i- w" o4 y, [+ ~5 q' F0 S9 V - Database=test& s1 O: h5 H9 @$ O; {
- Hostname=localhost3 ^& a$ m: x# O$ L' D. f6 @* t
- User_name=testuser8 D4 T/ j6 s+ Q0 w+ y2 H& O
- Password=my_password
5 [3 }, Z+ k' p8 G, w5 |1 Z" ` - GetDriverFunc=getSQLDriverMYSQL
1 W* `( r5 a+ u& z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- ]. P7 U# o& P4 G6 \; T6 x
- LibraryName=./libsqlmy.so6 A7 G X' {* v+ @
- Active=1, @0 H( S) n, ~
- ---example---7 R& t- y$ J8 x6 \( e6 g. X- A
- ' m O. h6 b6 ]' |* q) z7 K2 l2 D0 Z
- On a windows box, also running the MySQL server locally, it would be:
, E) S& Y$ d2 B+ r3 U* u: x) | - ---example---9 A4 D4 A( O8 @; i
- [DBEXPRESS]( g% |# J+ a% K) e, d4 O
- sqldir=mysql_sql8 U4 D* A# V- {( q2 u
- Drivername=mysql
4 ~ c, V+ L0 J2 I- { X9 m0 w - Database=test; X$ n4 s5 D! `2 B" J
- Hostname=127.0.0.18 @9 W6 t) @9 [& |" J) {
- User_name=testuser
) b9 s) o: a$ k: Z - Password=my_password3 l0 e, t$ h6 I$ }- z Q5 r, J4 Z
- GetDriverFunc=getSQLDriverMYSQL
. {) C. R" \. n+ p1 e X - VendorLib=libmysql.dll. Y; E2 v: k. X- V& i' g
- LibraryName=dbexpmysql.dll
2 Y% Q0 k5 @4 F- Z. \7 ?' h1 z - Active=1
3 i5 l0 K" |9 Z l7 ~# P7 U: H$ n - ---example----
" ]' |5 F, e: q0 G* @; i* g - - written 02.03.04 by pwk.linuxfan: R" R! V/ W& F. w: t
- n, H, |* w9 g" |
复制代码 |
|