|
|
麻烦翻译一下,下面这段文章:xhan Z+ Q/ n( Z% p; Z7 s
C" p8 }! a9 P8 Z6 V-
& c! `1 o) R& L' A9 o6 ]7 O. B - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 j7 B( y5 Z2 K. o
) u& ^: t6 v d/ D% V3 [- ### What we need ###7 Q& e% l6 e0 J
- Naturally, we will need a MySQL server to store the data for us, this document 1 l1 W; ^3 y, f& w& D/ ?+ W
- will not explain how this can be done - there are documents out there for the 1 ^5 @! m! w# e. A
- interested. The requirements include a (empty) database for TeamSpeak to use
9 }8 m6 K% Y% r/ ~ - and a user account (username + password) that has the permissions to do stuff' C6 z; ?- d8 v- }
- with the database. Additionally, you will need a vendor library installed on the: o; e' ?$ N0 ?- f9 I
- local machine, this came with my MySQL install." ?, |$ k. y4 V. |5 f
- These instructions will not tell you how you might transfer your data from the% ~; a: G `* W) z
- SQLite database to the MySQL database, we start with a clean and empty MySQL
) g4 l; \$ k+ \9 t$ y - database.
& U7 @- \; D _; Y' l - Some users have reported ways to import a SQLite database into MySQL, but at& I& {- Z$ X2 S5 E/ `2 D
- the time of writing, there are still too many issues - check the current status" a$ }+ T/ t7 D0 ~' ] A$ H
- in the TeamSpeak forums if you are interested.0 B7 z* Q' Z( |' Y/ G2 B9 B$ W
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from- e5 {: d. m9 z! {: r3 F; v
- Borland was used. This driver can only interface with the client library that
; Z. q3 q6 o, ?6 }0 d6 g - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; s* H% R7 i# A5 _4 D
- client library - basically all you have to do is to use a 3.x client library as 2 w3 S( j" {: r9 p6 x' l
- "VendorLib" and a 4.x database to connect to.# b E H- D/ z' T$ [& K
- If you need more info about dbExpress, you can contact Borland.# ~: I w: \9 a* w, Y6 n& y
- 9 Z: S7 ], g: D/ N$ l) y, _* \
- ### Doing the work ###0 B: r5 Z+ H! w, N0 F
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ k9 A0 i* W) x2 s% P. P' p
- the perquisites right, just open your server.ini file, and add this section at' A/ a% ?, u& c, o& d( I
- the end:% y5 f( {- T' e1 e$ n9 L) X
- ---cut here---/ p- A/ p, Y/ Z6 W
- [DBEXPRESS]
H) P6 G) g% ?* U+ A# R0 v" | - sqldir=mysql_sql
/ v3 ]8 _8 q9 F+ R - Drivername=mysql' O3 Q9 B/ `; E/ z
- Database=Your_Database_Name_Here: p0 G g. d! z7 C. [
- Hostname=The_PC_the_MySQL-Server_is_on e" B; J* F7 `; k5 Z/ x2 w: i
- User_name=User_name_on_the_MySQL-Server
! x+ Y4 M3 T4 u9 A, x9 e- A - Password=Password_to_go_with_above_user_name
+ R3 ]5 ?& e% b" \: z" R - GetDriverFunc=getSQLDriverMYSQL. ^1 S# ?( y) H7 T% c
- VendorLib=path_pointing_at_your_mysql_vendor_lib
8 C. E1 m# ]6 n: D# L - LibraryName=path_to_libsqlmy_libary% [+ s5 D: N7 n% a: l
- Active=1
" C( _) f% C* @/ o+ P: R" d - ---cut here---
# k! w) R% o: E& D( N* x5 S( w - In my environment (a linux box with a MySQL server running locally) I have:( v+ U3 q1 N* ^" [4 m
- ---example---
5 U- d# V1 x& a* w4 M - [DBEXPRESS]
' I5 T5 K# |; K2 C u$ _. Y# J - sqldir=mysql_sql
+ ~" G) Q% J& d; g# W3 b7 w* w& r q - Drivername=mysql( G5 G0 b6 X" h7 K% ~' H2 O
- Database=test
# c9 c; e3 }$ }* N - Hostname=localhost
$ n8 I7 Q( q8 Q4 o& h- N - User_name=testuser# I4 N T- }# k0 f: i
- Password=my_password" b7 t/ ]+ X+ d" e# U% }
- GetDriverFunc=getSQLDriverMYSQL
+ Z% W' }3 R2 r+ W- ?) a3 _ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, l: \( I6 D: D - LibraryName=./libsqlmy.so5 d6 _# p# Q0 O* } p# J
- Active=1
& G* f$ ]9 J$ [+ a# |3 J - ---example---
% F3 d. f- o% k5 a' m8 }. N3 _1 f
5 C7 T8 e+ h5 D% u/ j1 I- On a windows box, also running the MySQL server locally, it would be:6 S# E- D) {1 N% a! ]- S: t1 {0 L
- ---example---
& B$ h5 o2 C- I2 o9 d - [DBEXPRESS]! R9 h1 W+ v/ I0 b# ^- U
- sqldir=mysql_sql
% e0 ^) [! w& w9 t9 `) P6 i4 q( I6 s - Drivername=mysql
! V' C! ^6 w5 U, z/ I1 a6 g. o - Database=test5 z) b3 L2 }0 Y& z9 w1 q( j
- Hostname=127.0.0.1
+ ]* ~! \1 |- J0 [, q - User_name=testuser
: {8 | L. g% z1 y+ y( s: P - Password=my_password* ^8 W, r. q' p+ U% t: a% q
- GetDriverFunc=getSQLDriverMYSQL
# w. g7 C. ?: o/ r7 H - VendorLib=libmysql.dll
6 s1 E! J/ q" Q$ P - LibraryName=dbexpmysql.dll
& L$ F/ Q3 w! R6 C3 P - Active=1
% [! \3 R+ J$ O* S+ M/ T - ---example----
+ u# U) r# `$ \8 u - - written 02.03.04 by pwk.linuxfan, U, j0 F' B7 ` w
- 3 z! o& [" o P& m0 l2 u
复制代码 |
|