|
|
麻烦翻译一下,下面这段文章:xhan
# M$ i6 b5 u( B' J, c* u. J9 N% l; k. W4 }
-
4 y( a+ g5 A1 F- K* R W; V: L! ?# T' O - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######2 o0 F1 |# X3 l
- 5 v- Y* |# a- N" i0 g; m/ l
- ### What we need ###$ q! i/ p, `. ^. l
- Naturally, we will need a MySQL server to store the data for us, this document
7 b0 V% l# _: m3 ?$ Q! D1 Q - will not explain how this can be done - there are documents out there for the
4 b1 U7 ^' o- [ - interested. The requirements include a (empty) database for TeamSpeak to use2 u9 k; a8 f+ Y, J+ n A
- and a user account (username + password) that has the permissions to do stuff
# }' y* |4 ^7 `+ d+ U - with the database. Additionally, you will need a vendor library installed on the
" w3 r- w5 {% X0 A0 O8 D - local machine, this came with my MySQL install.
4 f% h' F% {/ T- Q) h, s2 W - These instructions will not tell you how you might transfer your data from the
) c7 \* E" z2 h; P" g$ U - SQLite database to the MySQL database, we start with a clean and empty MySQL
9 e" G0 z$ R% [" K - database.' f/ A* T) U9 b8 L8 k, V
- Some users have reported ways to import a SQLite database into MySQL, but at( a& i4 K* }$ V W$ x4 N
- the time of writing, there are still too many issues - check the current status
, E; d; U5 |# Z6 V - in the TeamSpeak forums if you are interested.8 m v2 a7 w& i7 a; L0 j
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from0 f9 o9 @+ S" v5 Z2 t3 u& G
- Borland was used. This driver can only interface with the client library that
: h9 |: F$ u' A: n4 C' M k' Z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
! f' } ` K, c3 \& i3 c' _" Y. N- b - client library - basically all you have to do is to use a 3.x client library as
7 I( ^& C6 p, p% ] - "VendorLib" and a 4.x database to connect to.0 n& A/ d- h0 r2 W* {2 Y' {
- If you need more info about dbExpress, you can contact Borland.$ Y# _9 x& N: l8 l8 k7 Q
- 8 p/ h' F2 K, _# i4 |
- ### Doing the work ###
/ U- \0 t6 J7 u9 N - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
2 M! Q! X' J C- D$ G# ~ - the perquisites right, just open your server.ini file, and add this section at
) k( _/ g6 E+ I& j* D+ P - the end:- _: A: Q v/ O: Q, D& M* r# o
- ---cut here---3 P, T7 y$ |6 m8 k+ ~' F: `
- [DBEXPRESS] b/ d( C! z6 J T4 v ]5 l, N- g
- sqldir=mysql_sql
2 |7 ^5 b$ v8 h5 F4 r- C - Drivername=mysql& U3 b6 ~9 h# i
- Database=Your_Database_Name_Here
1 u+ a/ Y n$ O2 I- Y - Hostname=The_PC_the_MySQL-Server_is_on
2 k1 ^1 k( a0 e! g" }& S( Q - User_name=User_name_on_the_MySQL-Server4 n+ x& Z2 ?/ [0 M9 G6 q
- Password=Password_to_go_with_above_user_name: u* i( Q7 ?; @; q4 u
- GetDriverFunc=getSQLDriverMYSQL
$ ^" ~" ~0 N. j- p - VendorLib=path_pointing_at_your_mysql_vendor_lib
9 m9 G; Z( Q) K5 k1 P/ e - LibraryName=path_to_libsqlmy_libary
0 \# |0 L# W! G9 O* b9 e0 z - Active=1
9 Q6 W- E( j8 T: E( _ - ---cut here---
/ _ D" ^$ `8 e. R - In my environment (a linux box with a MySQL server running locally) I have:& ^, N! J' ] n. b* n0 r) y' ?
- ---example---
0 K$ h7 A8 e- n8 h! j; s - [DBEXPRESS]
, j t+ }6 m7 H; h# G - sqldir=mysql_sql
/ R) ?0 O$ F$ n. G - Drivername=mysql
# D1 l" A. r" x - Database=test
+ n; D$ Y8 R) J9 M - Hostname=localhost% C) n4 B6 _/ E2 H1 c
- User_name=testuser) l0 [ W1 s! `, _! `3 h* h+ s4 r
- Password=my_password u( C5 \. j* X2 {: W/ b# a
- GetDriverFunc=getSQLDriverMYSQL
# Z+ D, n' p, Y/ { Y. ?% u - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. C4 n- T$ B, Y$ Z6 D1 @
- LibraryName=./libsqlmy.so" c8 j- K4 E; d; ?+ d ]
- Active=1
# o! M( K2 c0 K! ]5 X9 L# h - ---example---5 D) ?& R/ u+ X& f
- ' z0 C! o! m+ T" E$ N+ e) v4 [
- On a windows box, also running the MySQL server locally, it would be:/ @4 g! z9 O4 B& e8 i7 g3 C
- ---example---) Y4 l0 E8 `9 F- H' \3 F3 ?- q
- [DBEXPRESS]
8 q! m6 O/ c7 S, j4 }- h) [ - sqldir=mysql_sql
+ c% e- v5 M( c - Drivername=mysql6 \) g1 a% S" \ `! ?; q( C+ ~
- Database=test \) J, C l/ ?% K
- Hostname=127.0.0.1
( T$ h; w1 X* ~8 ^: S6 T - User_name=testuser
4 n) a1 u2 n4 K3 z& m - Password=my_password
8 D( _( L+ l1 x - GetDriverFunc=getSQLDriverMYSQL9 y) N# b2 A' J2 L9 f( T
- VendorLib=libmysql.dll
2 G' ^8 d) f$ m# a4 _8 H b0 k1 E - LibraryName=dbexpmysql.dll% u7 H; L6 O$ h$ i
- Active=1" c6 |8 ^. {, x; p
- ---example----9 \% Y3 R- l, ?. f9 l3 Q
- - written 02.03.04 by pwk.linuxfan0 K2 l# }' W8 d
- 1 }7 Z. P9 x3 N( `% R- }
复制代码 |
|