|
|
麻烦翻译一下,下面这段文章:xhan 4 L; ]5 [: D. S; j
; D) X! _" S R* X
-
' e3 ?' Z: Z% H: M2 l0 Z - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
/ m- T H9 g" _# f3 g) { - 6 x6 e# ]0 d1 L: R
- ### What we need ###
: ^2 Y7 ?7 Y5 Q9 _( C( X - Naturally, we will need a MySQL server to store the data for us, this document 3 X% c7 z; l* B) R, X3 \
- will not explain how this can be done - there are documents out there for the 3 d+ h: W" W4 p" ]- f
- interested. The requirements include a (empty) database for TeamSpeak to use
Q9 k, s1 T1 Z) I, m0 ] - and a user account (username + password) that has the permissions to do stuff. A; T" u' ]6 L( p$ [6 b
- with the database. Additionally, you will need a vendor library installed on the
4 v2 F& u! \* a, g e* }. R F0 J - local machine, this came with my MySQL install.# @, G6 A8 z! r
- These instructions will not tell you how you might transfer your data from the
) {, o8 G8 X1 a7 Y: s# p, j9 j' ` - SQLite database to the MySQL database, we start with a clean and empty MySQL
1 ]& \" N, ?# r, e - database.
( z5 x# W! G. V4 a - Some users have reported ways to import a SQLite database into MySQL, but at4 G/ m3 H* c' E" b' f
- the time of writing, there are still too many issues - check the current status: U! w& j- l/ }
- in the TeamSpeak forums if you are interested.3 S6 i) x9 E8 [! n
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( G! Y5 B6 h9 o* o5 d5 Y; j$ X% ~ - Borland was used. This driver can only interface with the client library that 5 x2 f' Q6 T+ i
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# x0 f, b- k. D. I2 N - client library - basically all you have to do is to use a 3.x client library as
. ~+ s- E; a* I7 E1 S/ D5 ^; c - "VendorLib" and a 4.x database to connect to.
; u I; C6 u G5 Y( H( ^ - If you need more info about dbExpress, you can contact Borland.
6 W$ B* w2 ^" @5 h2 z p - . r+ \, o' |) v$ ] B/ }
- ### Doing the work ###) ?+ V& U* y6 U
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. m: J* D* b) N: L+ A& y - the perquisites right, just open your server.ini file, and add this section at
+ }8 n' \1 O# H4 V/ |( A3 G - the end:
& h1 L# e9 N- \, d - ---cut here---
6 f( \/ m! m, N u - [DBEXPRESS]
4 I0 U" `* Z# M! b6 }- ^. A - sqldir=mysql_sql
8 {$ J5 l) ?- p6 `, c) ` - Drivername=mysql1 k7 U% G0 c7 e* a* K" @1 C
- Database=Your_Database_Name_Here
' c N; g) T5 r - Hostname=The_PC_the_MySQL-Server_is_on( `: E) l8 d1 A% a( C% q% Z% m- h9 z
- User_name=User_name_on_the_MySQL-Server' s- K4 p7 X" D& q, o1 @
- Password=Password_to_go_with_above_user_name5 [* P V* [' e
- GetDriverFunc=getSQLDriverMYSQL, s1 u0 Z4 s6 y! x8 ]
- VendorLib=path_pointing_at_your_mysql_vendor_lib* R. e. n7 ]5 O# p" H
- LibraryName=path_to_libsqlmy_libary
& d/ _0 t2 O2 _* x+ t - Active=1
1 N5 E4 L% N. @8 D$ K4 H" Y7 ]$ L - ---cut here---) N4 f0 ]- ]8 r
- In my environment (a linux box with a MySQL server running locally) I have:% f* P3 i, Z4 B" W8 E2 o# s' J
- ---example---3 s2 Q# _- O! u- D1 p8 G/ q* P
- [DBEXPRESS]
, f/ s8 x+ F7 O0 g; d - sqldir=mysql_sql! f2 R4 X1 E9 s) X3 v9 y4 X5 `
- Drivername=mysql6 \7 J+ P# a8 M" D
- Database=test) q& a$ F2 ^( Y* u2 |. E8 L. R
- Hostname=localhost4 l+ k% \/ B* }8 H$ D6 t
- User_name=testuser
8 U* W% a( ]5 I, }' O5 N - Password=my_password
: e) ^/ a* V7 f - GetDriverFunc=getSQLDriverMYSQL) B* I) S& U! c- t7 ^# B. R- i
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
q1 A l3 s+ A0 _6 a - LibraryName=./libsqlmy.so
6 ^- `7 g3 G/ a, v - Active=1
# ], g7 ^. h0 J1 ~! g9 L - ---example---( j H3 `9 m& d$ x: t
& o7 Q4 R# c% Y- x# R- On a windows box, also running the MySQL server locally, it would be:
* H) N+ C2 h; J( u3 ^/ A - ---example---
; X1 c2 n$ e8 q - [DBEXPRESS]$ o# H8 Y& X# N+ g. m6 H
- sqldir=mysql_sql K( ~0 `; n* Q
- Drivername=mysql0 m' }0 `1 V6 a1 R
- Database=test
2 K- [& H& h8 j, J+ E- ` - Hostname=127.0.0.1- v3 N3 N2 ^7 i1 a" v9 h q( C. p
- User_name=testuser
1 h' I( v g$ W+ Z# e! h: g! O - Password=my_password2 Q: s' G6 Y5 U h, m0 s" N
- GetDriverFunc=getSQLDriverMYSQL e K4 q. f$ A$ c$ p
- VendorLib=libmysql.dll' a1 W- `# q8 t3 @2 e# y I
- LibraryName=dbexpmysql.dll' a' s; G. `* d
- Active=18 G4 Z% ?7 l7 J
- ---example----
, t" O% O y7 X$ t' T4 C' W, M0 @ - - written 02.03.04 by pwk.linuxfan
x' o$ _+ |( r- X U - 6 _$ F. M" l8 A/ R6 T* e& k" u
复制代码 |
|