|
|
麻烦翻译一下,下面这段文章:xhan
2 ~( {9 i8 [$ B9 o+ ]' I( b, ~$ s0 N) a
- 5 `; N2 e4 Q! J' K' A. q% r# ?& H
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 D- r3 R A: L2 X# f' ?1 L; ~9 @
' f/ B2 f! D, Y- ### What we need ###
, T8 `0 `' w2 g! z% i - Naturally, we will need a MySQL server to store the data for us, this document
- _% O8 B7 X+ Y9 b3 s" ]1 r - will not explain how this can be done - there are documents out there for the
$ c( h" d1 g, z3 k5 @' _& m' ? - interested. The requirements include a (empty) database for TeamSpeak to use2 z6 p( r' p' Y
- and a user account (username + password) that has the permissions to do stuff) i5 ~, N$ Q' N, o4 M
- with the database. Additionally, you will need a vendor library installed on the! Q6 q* A7 \3 V& T
- local machine, this came with my MySQL install.$ r3 y* T! x. c5 n; T) ~+ E
- These instructions will not tell you how you might transfer your data from the% o( J, [, X- B
- SQLite database to the MySQL database, we start with a clean and empty MySQL8 A3 F0 Y; F' Z" v3 s& k0 _
- database.9 K. m9 E# Y+ f- o
- Some users have reported ways to import a SQLite database into MySQL, but at
7 N. f8 C" d0 O* c - the time of writing, there are still too many issues - check the current status
7 N; V# |. O. h( J; X# z9 g - in the TeamSpeak forums if you are interested." a2 ^# s! j4 |0 F4 [" e/ c) Z1 p" k
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
& {) U4 S# q6 O- B% z# ~' l - Borland was used. This driver can only interface with the client library that
, s, Y8 B& N- U - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
- U" G, G% g; e, Z - client library - basically all you have to do is to use a 3.x client library as
2 g1 K1 l% Z- @8 l - "VendorLib" and a 4.x database to connect to.* j" H `7 m t2 R/ \
- If you need more info about dbExpress, you can contact Borland.' X) B& v: O0 S
7 A9 C& J' R5 j5 F+ c7 m- ### Doing the work ###8 _. |: u: k2 p
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
0 e0 O! E8 ^% \4 w& I - the perquisites right, just open your server.ini file, and add this section at
" D) Y0 Z% n* j: N - the end:
( @ O. Y$ h( f! c: q2 x) A - ---cut here---7 K& F7 d# O! E9 t0 I" P, \; o
- [DBEXPRESS]& t. P+ |4 m7 L# L" E/ E- r. b
- sqldir=mysql_sql( w, Z1 @/ _: ^5 t0 o
- Drivername=mysql
! W( C H1 G* n1 @7 h - Database=Your_Database_Name_Here/ d, e+ U' |4 Q2 ?
- Hostname=The_PC_the_MySQL-Server_is_on* f4 S, i" ]4 i
- User_name=User_name_on_the_MySQL-Server- N& `* k$ O: [& d7 M6 T' {' J
- Password=Password_to_go_with_above_user_name
# f& Y2 ~! }# k - GetDriverFunc=getSQLDriverMYSQL
' f4 E- Z7 |$ ?9 c. p( L g - VendorLib=path_pointing_at_your_mysql_vendor_lib+ E6 t# @ M# p! A" t2 j& g
- LibraryName=path_to_libsqlmy_libary: }7 u( H4 b' F/ l4 s. ?+ G! T
- Active=1& N: m6 I, L. D! [) D. g7 c1 o' P
- ---cut here---
9 Z* e3 L3 C2 K: [8 G - In my environment (a linux box with a MySQL server running locally) I have:
- p: {7 n* L6 ~6 M0 T: M - ---example---# V- q: A8 Z0 J$ K
- [DBEXPRESS]/ N' L8 e/ V! M: p
- sqldir=mysql_sql+ \* a9 Q; w' |' P2 j- @4 v
- Drivername=mysql
0 R) J+ P* r1 a - Database=test t" M- L% o% O' g: ?% @* s
- Hostname=localhost* }! d! Y" V5 r/ ~
- User_name=testuser! G" j& Q9 E% C. V/ k
- Password=my_password
f& [ H o0 j+ f" H8 t; R - GetDriverFunc=getSQLDriverMYSQL) V3 @& R4 r& C, ~6 {5 V% }* l' f
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.02 a, i) { C' }. c" r+ g3 D
- LibraryName=./libsqlmy.so
2 U7 t) u: y$ D' y; z - Active=1
. ?' m- f4 l+ i# z* e) i - ---example---
3 u/ o: ~8 M2 [8 u - + Q" f. m/ i% `7 f5 }: o3 O
- On a windows box, also running the MySQL server locally, it would be:4 z( J3 i& C" X W) d- E& N/ q. [
- ---example---
& J% I" L' V3 ]: e. E - [DBEXPRESS]5 _* M5 ]( O% r/ T
- sqldir=mysql_sql$ x6 f/ m0 q% b
- Drivername=mysql$ a8 f& W' |# R1 K* f+ g1 {2 d
- Database=test
7 i8 S: }3 K0 _3 v4 B+ n6 w8 c/ n - Hostname=127.0.0.1) F1 I, L; e6 @4 T9 b
- User_name=testuser) A U. m. D( o$ |+ ]: |, S
- Password=my_password( _% ~( R- f0 r" z8 q/ G
- GetDriverFunc=getSQLDriverMYSQL: I# U. s8 H6 G: p* ?2 j: N
- VendorLib=libmysql.dll
$ @; U" w- ~6 d - LibraryName=dbexpmysql.dll
, [1 h) j0 ^2 y' z* O; o - Active=1
9 `3 D1 Z( ?2 s0 q2 {8 u& D - ---example----3 C- y$ U: r' ~- I! f+ n
- - written 02.03.04 by pwk.linuxfan2 n F& P0 X' B8 t' l1 Z$ Z
/ u. C% d4 k) K( U" R2 a. G: o
复制代码 |
|