|
|
麻烦翻译一下,下面这段文章:xhan
* V$ Z# z; n* ~8 I6 x% C3 ~
8 a( T) i3 q8 E$ U& k-
8 L- ]) ^9 Y! o& T ^( Q9 V/ E - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######3 [, J, [& l' E( U
- [- D: @8 m8 U% E2 Q
- ### What we need ###
0 _: r# k9 ]9 A! B. d$ c! H" p - Naturally, we will need a MySQL server to store the data for us, this document 0 A9 ^2 k! N) m# A$ w1 E
- will not explain how this can be done - there are documents out there for the % ~% \ [( m ]
- interested. The requirements include a (empty) database for TeamSpeak to use$ v& s3 O' R3 e/ X
- and a user account (username + password) that has the permissions to do stuff- S6 o# Q" B( B% o7 B" h6 E' @' e8 }
- with the database. Additionally, you will need a vendor library installed on the
( y: G8 Y5 R4 [ - local machine, this came with my MySQL install.
& y, b: s. k$ _+ ~ - These instructions will not tell you how you might transfer your data from the
' G, ^4 b# \" Z3 T2 G( t - SQLite database to the MySQL database, we start with a clean and empty MySQL
+ e% h1 g1 X$ c. T - database.
7 z9 q# w4 B! z - Some users have reported ways to import a SQLite database into MySQL, but at/ M; L7 {( M7 S, t5 D3 p( k
- the time of writing, there are still too many issues - check the current status; Y* ?/ p8 q* ^- e3 g' v* }
- in the TeamSpeak forums if you are interested.
5 y2 ]7 V2 M) }2 U* p! t5 p - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from% Z/ D6 t3 [8 a: ?% I5 ?4 ]
- Borland was used. This driver can only interface with the client library that 2 N* n7 B1 S% _/ P6 j2 f: z+ O* J6 C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
2 T, o* w; i) Q* ~ - client library - basically all you have to do is to use a 3.x client library as 9 M2 g6 s- @2 }/ o: [3 ^. P
- "VendorLib" and a 4.x database to connect to.3 a; H- C- J- D5 c% _5 o, l
- If you need more info about dbExpress, you can contact Borland.
! D& w' N' ?$ i1 `/ ]2 U - ' n$ b$ Q2 y$ _; Z G
- ### Doing the work ###
6 O5 E& ^6 Q! l$ |6 Q7 k - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all. D5 q( F7 k' d) u& Q9 r9 B8 Y
- the perquisites right, just open your server.ini file, and add this section at- S" H3 r4 q. @$ ?: t3 W# H
- the end:9 t. t c" b, M) Y4 H6 ^& A2 K
- ---cut here---
- \7 i1 Q8 Y# g8 W! ]1 X- [ - [DBEXPRESS]
: A" S" o/ [, w8 W1 e' [ - sqldir=mysql_sql
- o4 [& `8 o" l$ h1 V D c7 J - Drivername=mysql- m; v! k/ B U
- Database=Your_Database_Name_Here
8 V: k+ _0 K& G - Hostname=The_PC_the_MySQL-Server_is_on
* W/ d$ w) ]% u9 A0 @- S/ l - User_name=User_name_on_the_MySQL-Server& y) M% b# Y. s& [
- Password=Password_to_go_with_above_user_name1 R7 B2 U9 t* p( @& F h3 o `) L
- GetDriverFunc=getSQLDriverMYSQL" P# P( v% [& }; G. v8 V# \9 m
- VendorLib=path_pointing_at_your_mysql_vendor_lib
( @5 j3 e- a' S+ o - LibraryName=path_to_libsqlmy_libary! f0 M& v: ]6 u% a* a- O
- Active=1
4 P5 _- }; t+ y# Z! P' y - ---cut here---, z9 {! Y5 W" K6 B8 c* P
- In my environment (a linux box with a MySQL server running locally) I have:
5 y% f5 j0 l+ ^- m1 T - ---example---* ` {) J6 M: U
- [DBEXPRESS]- L% ~1 @$ U9 ~/ t) K. q: G0 j
- sqldir=mysql_sql1 c' o6 ]/ c8 r4 X* e) T: {
- Drivername=mysql
5 c# a# R8 D+ v' ?/ J8 r, i6 l - Database=test4 }' t/ w9 q0 Z3 T& R
- Hostname=localhost
$ U$ \- e! s# j, c. U - User_name=testuser
U" L+ Q$ L6 Z" C l! @, E - Password=my_password8 T8 p) ` S5 X& w. _/ f( ~& V" `
- GetDriverFunc=getSQLDriverMYSQL
; j3 X5 ~! B+ ^) A2 G - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ S+ ]3 K( x: C# i, r& v* j4 a
- LibraryName=./libsqlmy.so. q! f. ?2 g9 L) [3 n- w, H
- Active=1
- H- |5 J8 U2 R - ---example---
8 }& p$ w" ~( i- b' {) y+ } - 6 Q1 P0 j- l0 @% v7 K5 A5 X9 u# [: I
- On a windows box, also running the MySQL server locally, it would be:: @4 d2 D5 v, B1 D
- ---example---
6 j1 C8 U z* w$ k& g - [DBEXPRESS]
% `" x1 s5 V( i - sqldir=mysql_sql/ Z2 F2 ]0 p. H, l4 F/ i. t
- Drivername=mysql
3 e d/ A2 \7 Z& ] t- d# V - Database=test9 o9 \& D/ h+ O5 \
- Hostname=127.0.0.10 ~( h: ?0 \. B& e* |
- User_name=testuser
# Q: ?; `5 J; b/ g- ?3 P7 D - Password=my_password
; i" [1 }0 D+ e4 {5 F( W - GetDriverFunc=getSQLDriverMYSQL+ s2 F5 H* @5 Z5 s6 V/ \9 p
- VendorLib=libmysql.dll
3 P3 t1 ^5 @! W+ U# o - LibraryName=dbexpmysql.dll
+ M$ P5 D4 B( {! X$ e I2 _ - Active=1; l E. O, X/ z; c T9 Q
- ---example----
0 h+ N% R* {8 d) ~- ? - - written 02.03.04 by pwk.linuxfan
' W& L" n# h0 c7 @! Y1 a
6 ~3 [8 O: Y, Q, o) Z
复制代码 |
|