|
|
麻烦翻译一下,下面这段文章:xhan 1 @: q6 N k* o! J7 T4 |$ [
M" S' M% L G5 k6 Z
-
1 V& I6 e" d- l$ V/ S) | - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 g! s6 S! C$ }- h3 q
+ C3 Q# ^7 Q5 z/ u* q; H- ### What we need ###
" e3 p+ Z0 [2 {+ m" A - Naturally, we will need a MySQL server to store the data for us, this document 8 c3 s3 Q( j1 \+ G7 x
- will not explain how this can be done - there are documents out there for the
9 N% V- u. u2 f' X5 b8 R# \* D - interested. The requirements include a (empty) database for TeamSpeak to use9 X! k6 V% R* A. N. ^/ N5 S4 k; m( o
- and a user account (username + password) that has the permissions to do stuff0 h: ^& E* S+ ~4 b% ~ g2 n* B
- with the database. Additionally, you will need a vendor library installed on the& o6 K7 f2 x* X, g9 f
- local machine, this came with my MySQL install.
1 f( H Q) U3 C0 w, P: } - These instructions will not tell you how you might transfer your data from the
3 E) _( j# D, z) o - SQLite database to the MySQL database, we start with a clean and empty MySQL' N0 C' d A6 J# T+ o
- database.
L* p2 \( _% n. U, g! h" Q& u4 r - Some users have reported ways to import a SQLite database into MySQL, but at
! N& ] W' M. O! L0 W - the time of writing, there are still too many issues - check the current status
# B% D& O y! K3 T( N3 N0 \ - in the TeamSpeak forums if you are interested.
; H, U+ A2 t$ N7 w J - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from. F* o6 l* ?: `0 z: h X
- Borland was used. This driver can only interface with the client library that
$ ~( i Q% n. B0 T8 z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! o: a7 V6 P: _
- client library - basically all you have to do is to use a 3.x client library as 0 I1 Q+ E3 h8 {8 Q0 j, h5 ]
- "VendorLib" and a 4.x database to connect to.
9 N& k$ N* k4 @0 I. {1 z! K! D - If you need more info about dbExpress, you can contact Borland.
: q q) Q5 @4 M% z* ^' u - / N. T/ Z( Q+ I, w, Z: [7 y |
- ### Doing the work ###
+ x& W1 U$ { }4 A3 |" O - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all; N q# P6 R% A' t# [
- the perquisites right, just open your server.ini file, and add this section at
' u0 k* ?* N* C: f - the end:5 g" j6 r: R6 e/ A+ D
- ---cut here---
+ t7 }; p8 Y2 B1 Y - [DBEXPRESS]
- {6 d' }5 s, Q C - sqldir=mysql_sql
' R; @3 }8 v p# t" I6 T+ H- B0 u - Drivername=mysql
q, X& ~$ |9 A - Database=Your_Database_Name_Here
, d1 l) V; }+ n3 u+ e, x - Hostname=The_PC_the_MySQL-Server_is_on; ^" J/ L5 I" C1 r! A+ Q
- User_name=User_name_on_the_MySQL-Server
/ `, L# ?; G+ \1 m& |$ ? - Password=Password_to_go_with_above_user_name
3 i/ R$ j% A; K) Y/ {* l& f Y1 O( | - GetDriverFunc=getSQLDriverMYSQL- u' \9 R9 R& b9 e2 d6 ~# I
- VendorLib=path_pointing_at_your_mysql_vendor_lib: h4 h( v" d# C0 s' Y( o. Y
- LibraryName=path_to_libsqlmy_libary
; x. O B/ c2 f - Active=1/ r% j# A- M" Q0 P. f
- ---cut here---2 W, b& B; |8 g
- In my environment (a linux box with a MySQL server running locally) I have:
% {! y- ]) A: q. Z. O8 d. j - ---example---
- ~* t: v' [8 A" F: H- q - [DBEXPRESS]
+ L( s# f( l$ b - sqldir=mysql_sql
`) j) ^6 \8 `; j# C5 ^+ w) M+ e - Drivername=mysql
2 G) ~, Z, x- F1 S5 h7 P. N% g - Database=test
' F5 N% a4 _4 c" g4 G - Hostname=localhost
8 P. a% Q; u1 S% U' z - User_name=testuser
! v' g& @ `, t - Password=my_password
; ~, v$ m p& _8 u - GetDriverFunc=getSQLDriverMYSQL: T9 H$ q8 t8 u- n& h" G
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
5 J- P# w6 {. ?) a. {; _! I - LibraryName=./libsqlmy.so# k# |' E4 Z8 B8 \7 ~ y( N) F
- Active=1
) n" l' b! F$ _4 _0 x _ - ---example---
6 o& U6 f$ X" G9 H8 \7 E
7 \2 }0 v' w1 N2 t$ y- On a windows box, also running the MySQL server locally, it would be:2 G$ o) _( x; w6 i% [, b. O* E& k
- ---example---$ T1 X Q! Z2 ?+ }5 c
- [DBEXPRESS]4 d9 y' l4 V. H A+ }( f
- sqldir=mysql_sql+ n4 F0 s2 E: b1 s- |3 @
- Drivername=mysql
3 ]+ s1 d* }0 i4 \6 R$ i - Database=test
1 I6 _9 {% c9 V - Hostname=127.0.0.1
8 l1 d6 T& {) c1 Q0 B6 g# o k - User_name=testuser$ ~: Q, w: q% x& O
- Password=my_password m$ y8 Z8 ]: u2 H4 T
- GetDriverFunc=getSQLDriverMYSQL, x! N, a% k: x3 S" q1 C% q% g
- VendorLib=libmysql.dll: S/ @- G: D" I! n
- LibraryName=dbexpmysql.dll6 `, A# j+ \+ H3 |0 p* u" c
- Active=1
% K$ t+ F1 E, O( v, S - ---example----
/ _6 C% e$ ^5 t - - written 02.03.04 by pwk.linuxfan
( B0 S* ]5 L O4 U% g
, e8 \9 Q* f `7 T
复制代码 |
|