|
|
麻烦翻译一下,下面这段文章:xhan 7 z4 J. i, u# O( }0 g/ {7 [
" |& M) @# H: J7 m% I
-
- Q( i/ ~7 S) i! m& i0 M - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 M, S3 T( W! X- r( I: Y0 ^: @
- ' `; H9 |( i7 K7 [2 e) H0 Y& w
- ### What we need ###4 g1 P% ]# c% @$ O1 e6 K- w% [9 g
- Naturally, we will need a MySQL server to store the data for us, this document ( E* M: C( y+ O6 B4 c }( h2 {
- will not explain how this can be done - there are documents out there for the
' _* Y* X3 m# D" R% ~ - interested. The requirements include a (empty) database for TeamSpeak to use
' x0 i, K0 N7 N+ c" F! I - and a user account (username + password) that has the permissions to do stuff
/ z( y8 j9 H' t8 O - with the database. Additionally, you will need a vendor library installed on the0 Z1 |" d1 c6 E# D
- local machine, this came with my MySQL install.
0 D" i4 W/ x' Z5 q: O/ @9 A( z - These instructions will not tell you how you might transfer your data from the6 G/ r' e! G' G7 R9 `: a
- SQLite database to the MySQL database, we start with a clean and empty MySQL
- `6 b4 U1 N; w - database.
# Z) F' K% n, }) |) Z2 |+ e! ^ - Some users have reported ways to import a SQLite database into MySQL, but at
3 e5 M' q' K/ K/ Z4 L2 G( c - the time of writing, there are still too many issues - check the current status$ C# b" D9 I4 B7 _7 M: x# d
- in the TeamSpeak forums if you are interested.8 }2 s# e. n- `, ^
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
2 t1 X" d4 R& K - Borland was used. This driver can only interface with the client library that " J. O/ |4 s5 g
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
0 E n2 e1 U. w* t - client library - basically all you have to do is to use a 3.x client library as
4 I4 s' r& d: j( f) v4 h$ r - "VendorLib" and a 4.x database to connect to.7 l, ?+ y- v- Y/ F" k( o4 {8 k1 P
- If you need more info about dbExpress, you can contact Borland./ L8 k# I( ~ u5 Y0 X# L8 m+ \
2 S# E; ]9 M3 y' H) `( ~1 Z) Y- ### Doing the work ### r5 w3 F: a7 `: D. A( y; h
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
$ g6 G7 J+ A; Z! ^" Q! Q+ r2 u - the perquisites right, just open your server.ini file, and add this section at
4 k4 ]6 q0 |: S - the end:6 a0 D, b- ]& |' h0 k2 l
- ---cut here---
7 e9 N1 k2 t5 ~; k, q - [DBEXPRESS]7 @& m2 @( ?5 q5 R: Q9 U; k- n
- sqldir=mysql_sql
: j) G8 R* ?' h- U L - Drivername=mysql
0 W2 b9 a0 V3 d - Database=Your_Database_Name_Here
# |, {* f5 ?$ _; S - Hostname=The_PC_the_MySQL-Server_is_on/ k" k" M5 z( J- L' J
- User_name=User_name_on_the_MySQL-Server
8 ~) w' A2 f$ V! D8 ^( p - Password=Password_to_go_with_above_user_name/ K! Q) c4 \( i- t
- GetDriverFunc=getSQLDriverMYSQL, E1 ~- L% U: u2 ^% n
- VendorLib=path_pointing_at_your_mysql_vendor_lib4 @) z6 w* v+ Q. v# x: c2 @
- LibraryName=path_to_libsqlmy_libary, t: m* a5 j7 C+ T! r# z) G: z3 W$ B
- Active=1
5 I1 k8 |8 J, D8 M - ---cut here---
! v! ]' o2 `4 ]- D' ] - In my environment (a linux box with a MySQL server running locally) I have:
8 ^; x, f( d9 g) k - ---example---
K' H4 F( T5 d - [DBEXPRESS], ]. E- m4 H! x7 B1 {$ E& r! k
- sqldir=mysql_sql
! V) ?/ q8 s$ }- }9 F" P - Drivername=mysql0 P, t: b( p; u! f8 G7 [5 Q& J: ^
- Database=test& g5 ^$ i* k, ~8 A" m
- Hostname=localhost4 i9 o" v0 t, F
- User_name=testuser
/ s" r7 ?( Q! [2 k, }9 q# Z - Password=my_password/ p+ k3 `5 \$ y4 H' q
- GetDriverFunc=getSQLDriverMYSQL: p$ u7 `! S6 [& r W: X
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- [9 C5 v$ q: K/ r, t) U/ v0 G
- LibraryName=./libsqlmy.so& T% q( u/ c X M0 t
- Active=1: n' i1 p4 J a) @9 S
- ---example---
- B$ h, h6 I' W( @/ h3 Z; j - 8 @- g9 b4 f; V' ?; e
- On a windows box, also running the MySQL server locally, it would be:
! i. I) ~9 W. A7 D8 f9 W - ---example---
! l* _0 U) Z0 A' K - [DBEXPRESS]& L, Y f) Z4 C% w( O) L' J4 Q' d/ F
- sqldir=mysql_sql( L. ?& N' H$ S6 L: j4 y5 ?
- Drivername=mysql [0 F- }4 T# ?2 X+ [% {
- Database=test
% X: ^8 ?3 D1 Q% h( a! q - Hostname=127.0.0.17 I+ u: F5 j8 L8 d: }
- User_name=testuser
% f* j0 F# V$ C# C C - Password=my_password
" O" T8 v- O/ \' z0 s" |) K - GetDriverFunc=getSQLDriverMYSQL& u+ u. l! Q @; {" S" j H
- VendorLib=libmysql.dll
7 {: J: c- v2 }$ q$ n% e" i - LibraryName=dbexpmysql.dll% ^: v w6 Y3 {, X
- Active=1& A/ t8 G' L' ^3 e/ _( X& k
- ---example----) ^' b# [4 f9 D% K# C8 O+ @4 ]& d
- - written 02.03.04 by pwk.linuxfan! _8 `8 ?" N \# t
- * \% Z- A1 _" |0 V
复制代码 |
|