|
|
麻烦翻译一下,下面这段文章:xhan 3 v% ~% W2 w# ~
+ w! t H8 q( m+ H- J I- j-
& V% O/ Q& @4 y6 o+ K- C4 [ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######2 @, t( D/ f2 ]; H/ Q
# I' d) Q4 ^3 E m# v/ t- ### What we need ###8 M- M3 X$ u T8 S8 ?
- Naturally, we will need a MySQL server to store the data for us, this document 9 e& L' Y& g) f
- will not explain how this can be done - there are documents out there for the
3 H( f% r2 K5 Z: _8 [! {/ m. p - interested. The requirements include a (empty) database for TeamSpeak to use t2 a2 i* ^( {$ X$ S
- and a user account (username + password) that has the permissions to do stuff; g4 d$ c) [! v
- with the database. Additionally, you will need a vendor library installed on the
0 }2 y# C, r$ _; t - local machine, this came with my MySQL install.
$ `+ Z3 h( a3 f/ p" w - These instructions will not tell you how you might transfer your data from the7 c+ y; ?# n3 O3 v
- SQLite database to the MySQL database, we start with a clean and empty MySQL
% E2 F0 c/ m1 Q) V8 X; A - database.
: X7 H! X! C9 d# s - Some users have reported ways to import a SQLite database into MySQL, but at" r; e: Q8 Q5 y9 u7 M: }$ s
- the time of writing, there are still too many issues - check the current status! ]- _& u# ]# S" M
- in the TeamSpeak forums if you are interested.8 }7 R5 W/ Y9 z' b
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" e# `' v* V5 p0 C - Borland was used. This driver can only interface with the client library that 2 R' e2 y8 c+ ]' n& R0 S
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" {4 C1 I! s$ P2 \ K1 p
- client library - basically all you have to do is to use a 3.x client library as
) Z2 E; P. I) v - "VendorLib" and a 4.x database to connect to.
! }! a |& H& w( |9 t: z m - If you need more info about dbExpress, you can contact Borland.
1 D$ S7 I& R5 I$ `; f" H - + c0 }! }0 ~! z, y! ~. |
- ### Doing the work ###
a$ ^7 B& E# \/ J) Q: K* R - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 B' G) n/ N6 f5 ]/ B
- the perquisites right, just open your server.ini file, and add this section at
) V5 ^$ J; K; l0 s- k$ d& _9 o( [, {5 Z - the end:
" j. r4 p% Q3 d9 f$ g! R - ---cut here---* E! I" V5 g2 Y: I$ x+ L
- [DBEXPRESS]& h& M) p9 L& L- S/ H$ i1 G" P2 K9 P
- sqldir=mysql_sql
6 f% e9 J9 e3 ?4 Y9 c1 |" l - Drivername=mysql- e3 D4 l4 D8 y* E4 _" v- J9 ^+ G
- Database=Your_Database_Name_Here& R# v1 o( c! D0 j F, N1 `6 y, p
- Hostname=The_PC_the_MySQL-Server_is_on4 F6 _' s7 @+ p: w# X! K8 e# u
- User_name=User_name_on_the_MySQL-Server
% L y7 C: W4 Y! n: u3 B - Password=Password_to_go_with_above_user_name
, V- Y2 v2 X9 ]8 s( F' y! z - GetDriverFunc=getSQLDriverMYSQL
# W& T' W1 w# G# n3 b - VendorLib=path_pointing_at_your_mysql_vendor_lib
* L+ g9 E- G( N- N( W- d ? - LibraryName=path_to_libsqlmy_libary
# E+ b* B9 z' @& f% V7 G- H - Active=1
7 ]4 b' O$ z5 h3 h/ V2 ~ - ---cut here--- S" p( m9 f% ~
- In my environment (a linux box with a MySQL server running locally) I have:0 o# q$ |8 ^8 Q! u- ]
- ---example---& a( P; A2 [. w
- [DBEXPRESS]
; ~/ Z8 O) k; L1 [3 M, l - sqldir=mysql_sql
3 @" w+ Q* L; s7 }, | - Drivername=mysql
' p: F+ G" C! H5 x0 C7 A" ?9 H - Database=test
; o: P& S3 F0 q7 p* p - Hostname=localhost
* C8 n$ Q, {/ A* l$ i% m0 G/ J- ? - User_name=testuser; |( L8 n+ A- P- H+ k* f
- Password=my_password1 y3 Y" p. m) `8 p$ r5 Q
- GetDriverFunc=getSQLDriverMYSQL
1 @( [) ]2 Z9 \4 Q - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0 o& u, R. i( _- `( O j# o d
- LibraryName=./libsqlmy.so! J' d: Y2 b- I' y* G5 z- H4 v" B
- Active=1 y) J% U( P; v
- ---example---7 N' @4 D1 U* W1 ?3 ~& Z5 a! }
. u4 W$ f: M( N5 d# j- On a windows box, also running the MySQL server locally, it would be:
8 x) }3 Z8 K# i0 \- O" P - ---example---0 _2 |8 e4 x# j! K/ y
- [DBEXPRESS]
" M! c0 V! ?' H+ U1 z( k( N' }9 d# q - sqldir=mysql_sql
$ q% [: q' ~) ]! |4 @ - Drivername=mysql0 r- z0 X( ?9 Z8 Z* |
- Database=test
9 x$ O4 j& W$ z$ \$ I% b - Hostname=127.0.0.1) a1 ]/ }9 [$ u! E! r% [% w0 k) _
- User_name=testuser
* O; x2 ~+ m5 N - Password=my_password; T: u% D, R# N# c0 ?
- GetDriverFunc=getSQLDriverMYSQL6 N1 y+ T9 E# m) S! p8 ^) ^
- VendorLib=libmysql.dll
. O/ |/ i! U' V0 f - LibraryName=dbexpmysql.dll! \( Q* }* }2 ]0 ]% X
- Active=1& O0 i; W- g7 |2 f' n6 j ~
- ---example----
2 x. Y& n* I* J - - written 02.03.04 by pwk.linuxfan
, D5 { d4 U; D# W9 X; F
+ s5 Z _; _2 e8 ?4 z' B7 E8 u
复制代码 |
|