|
|
麻烦翻译一下,下面这段文章:xhan + A% c+ W# b) Z- J
# j# {7 ?# Q- M$ \* }- 5 i% X: V }+ o: a9 `2 ~# q
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######" U! {5 I, [/ a3 X# ]( \1 b
0 G, ~6 J" K, Y) b0 h3 F- ### What we need ###
/ ?* ?- }6 Q+ d# u - Naturally, we will need a MySQL server to store the data for us, this document % r! C" @' L+ b
- will not explain how this can be done - there are documents out there for the 1 e! E$ @# ?1 d; b2 P. p% V
- interested. The requirements include a (empty) database for TeamSpeak to use0 ^2 F( k. o0 ~: Z* X2 I( w* u
- and a user account (username + password) that has the permissions to do stuff
+ M* d' Q7 M8 T8 v2 c - with the database. Additionally, you will need a vendor library installed on the
3 Q4 f( }1 `# P [ - local machine, this came with my MySQL install.
+ N( d7 F4 |! q. i% G% c# w - These instructions will not tell you how you might transfer your data from the
* a7 `1 F1 D3 m1 M9 F6 C - SQLite database to the MySQL database, we start with a clean and empty MySQL
& g9 P; t; |2 j - database.
3 \9 C& [$ V t4 o" o1 h - Some users have reported ways to import a SQLite database into MySQL, but at
+ g+ L7 U' w5 ?- ^" h - the time of writing, there are still too many issues - check the current status
8 O, R. q+ V# f3 g; r: k3 ]3 \ - in the TeamSpeak forums if you are interested.
+ O, f$ p+ Y8 A" ~( ] - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
1 g7 y9 ~1 n" Z# a2 f - Borland was used. This driver can only interface with the client library that ) g q! _* l* q( x0 V2 x8 W/ m) \
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ p+ E/ ?, |8 Z) x- B
- client library - basically all you have to do is to use a 3.x client library as , P ~9 g, |! R& Y
- "VendorLib" and a 4.x database to connect to.: C' T/ v! Z7 I( a, [7 H4 t
- If you need more info about dbExpress, you can contact Borland.
. z! |% y3 W" ~' |
) o+ {6 F1 h. v* w7 d% \2 S% L- ### Doing the work ###% S5 \/ Z, |% U" C
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
N! P0 P1 D0 o& n0 p7 U - the perquisites right, just open your server.ini file, and add this section at
/ t" C* f* S# _: K3 T i - the end:
& f5 W! O8 ^' [. U - ---cut here---
9 J q- T9 @3 H3 M - [DBEXPRESS]
& \4 d' z' L2 ]2 ~* K* B8 a/ ?; R - sqldir=mysql_sql; |, j4 n/ b- ~5 s" C
- Drivername=mysql
, } C" q. i, J - Database=Your_Database_Name_Here3 M- m7 g) g. [- O
- Hostname=The_PC_the_MySQL-Server_is_on X( R- D! p) y
- User_name=User_name_on_the_MySQL-Server) ]+ N$ M$ O+ W. n/ o4 M
- Password=Password_to_go_with_above_user_name1 C/ m: [' _, _! b% t5 I
- GetDriverFunc=getSQLDriverMYSQL
' H I. L% a$ b, Z - VendorLib=path_pointing_at_your_mysql_vendor_lib
4 u- ^0 C: r E% k - LibraryName=path_to_libsqlmy_libary% L5 A0 ]8 `% w; X' z( R
- Active=1% g3 _& T3 v7 G- J; h
- ---cut here---7 V1 a3 E. m" t! a1 y8 o4 @
- In my environment (a linux box with a MySQL server running locally) I have:: }4 a P( a5 o: t, B) X9 u4 K
- ---example---
( \& J5 ]2 Y9 Z" W - [DBEXPRESS]
4 v" ?5 z. y& p( p. q - sqldir=mysql_sql$ p$ b- |0 F8 `; K; O' |" q
- Drivername=mysql
" f9 F0 B0 \6 V2 k - Database=test) a8 O. a/ J0 K; k. l
- Hostname=localhost. d# J" d6 ]' d8 K; a
- User_name=testuser
/ n# F8 d7 z! F, W5 p7 e x* Y - Password=my_password5 V- x, |. f- f
- GetDriverFunc=getSQLDriverMYSQL; o8 R' ?7 Y: J
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
5 \1 w# C7 \6 g' {. {3 ] - LibraryName=./libsqlmy.so) S( `' K; k5 a2 A. m
- Active=1
* k; j4 n' r- V+ s) q - ---example---6 V2 K$ j0 F: U0 T: |7 c
* `3 H' B1 \8 s+ s- On a windows box, also running the MySQL server locally, it would be:
+ d+ [6 o0 |4 _( X# ? - ---example---
) I6 d7 E5 V- v' z - [DBEXPRESS]+ x. J7 a: c* t0 _! u$ |$ k& s) z
- sqldir=mysql_sql
5 q8 a) s' {/ ~2 h$ f - Drivername=mysql
6 o' e7 W3 x S* W. i. ~' { - Database=test
8 ^* Z1 ]0 H8 o7 H6 P4 T - Hostname=127.0.0.1 m p. V+ @% Q6 `4 }7 }) Z
- User_name=testuser
7 o6 y D4 G/ k- {+ P4 F - Password=my_password
' E% g O2 f9 d3 y$ D. Y - GetDriverFunc=getSQLDriverMYSQL9 Z( F4 U4 x( i$ a% @
- VendorLib=libmysql.dll* J, f: {1 b, I e1 w2 |
- LibraryName=dbexpmysql.dll6 q) ]. n' U6 y, m
- Active=12 T. X" r' P+ h% N$ e7 X& Q
- ---example----
# j, e& e9 {3 o- S8 v7 V: D - - written 02.03.04 by pwk.linuxfan6 n) B* D% R8 y4 v- V' G3 ^1 V! f K
- # f+ o+ i% _# X; f
复制代码 |
|