|
|
麻烦翻译一下,下面这段文章:xhan
* h" J0 P, n$ P. I `
& I8 F7 m& H$ P! |$ ?-
; }9 a7 g0 L& D6 D2 A: M - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
: F! F0 e1 V0 t- K' ]
5 E# g4 K: J, y+ v' A- ### What we need #### S% `4 _8 \" y4 d
- Naturally, we will need a MySQL server to store the data for us, this document . M+ ~* c) }* j
- will not explain how this can be done - there are documents out there for the + g5 ^3 L, ?! y5 w7 t& ^( H* |
- interested. The requirements include a (empty) database for TeamSpeak to use* T- o. f' o- w1 z2 s
- and a user account (username + password) that has the permissions to do stuff7 F0 Z. S% \2 [" O j' |
- with the database. Additionally, you will need a vendor library installed on the3 c- S% h7 I$ d5 N0 l
- local machine, this came with my MySQL install.
& K' O3 W) B6 s" k, p - These instructions will not tell you how you might transfer your data from the
- t( q1 T! @# l& g) V$ o - SQLite database to the MySQL database, we start with a clean and empty MySQL0 k {" C" G7 ]/ b# z. w
- database.
0 j# U" _; {7 J* T( }! ^9 X1 Q - Some users have reported ways to import a SQLite database into MySQL, but at
2 B* R3 \2 a% Q. n/ P- ]( D - the time of writing, there are still too many issues - check the current status
1 e( {% P5 B# A5 X5 V) S" E - in the TeamSpeak forums if you are interested./ f5 j% m9 M: V: ^6 Q! d8 \
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
\0 u$ L1 }' m% `# d: E - Borland was used. This driver can only interface with the client library that
" V- ?* X1 Q/ I. q4 z8 C" { - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
+ g# }8 D! ~, k4 m. n& ?4 x+ O - client library - basically all you have to do is to use a 3.x client library as 4 D1 k, O( b/ O% Y
- "VendorLib" and a 4.x database to connect to.
! ]- p( N! ~: g' N5 T - If you need more info about dbExpress, you can contact Borland.
Y e* e3 Y Q* [2 M* _
: l* x* f# A2 F+ h! o- ### Doing the work ###
) S( n9 n ^5 ]6 l8 Z. ~3 ? - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ [+ }8 l/ a# b( R9 E0 q3 _$ `
- the perquisites right, just open your server.ini file, and add this section at
# v; O' w% f6 m$ O8 z0 O( @ - the end:. _' x/ p# ? i' [9 ]
- ---cut here---/ w7 I* o: U+ ~- w
- [DBEXPRESS]! m( Q" o0 m+ h0 a# b9 P
- sqldir=mysql_sql) t! o7 a# Q6 H" Q# ^% |
- Drivername=mysql
# P% k/ j) p/ }9 \ - Database=Your_Database_Name_Here
6 w% K* N# d3 |% x7 \ - Hostname=The_PC_the_MySQL-Server_is_on$ s$ ~& T9 M% ~8 h r
- User_name=User_name_on_the_MySQL-Server2 k" F# @( C) j
- Password=Password_to_go_with_above_user_name
) x. L3 v" }8 W! T - GetDriverFunc=getSQLDriverMYSQL
$ C; k9 _4 q8 P" H4 `" F - VendorLib=path_pointing_at_your_mysql_vendor_lib
/ K5 d" X7 n* y x% X( ?0 ~* y - LibraryName=path_to_libsqlmy_libary& Q5 ^% ~! X* H
- Active=1 ~: y8 g( R" U T, T
- ---cut here---
/ c4 \9 |/ m3 {' k - In my environment (a linux box with a MySQL server running locally) I have:9 y% L2 V6 b6 j% A- S
- ---example---) R, F" U+ l$ m- }2 ~
- [DBEXPRESS]
; ~1 A8 j8 M$ R8 z - sqldir=mysql_sql! m6 b' n+ ^0 \* {1 `+ p' q
- Drivername=mysql: B# z! p/ \" Y' E0 A8 R" a
- Database=test* [( f5 @# n! k* o! [' i, C8 k
- Hostname=localhost
2 r6 x6 y) D2 {1 D ^9 } - User_name=testuser: x/ E: A6 {1 Y2 G
- Password=my_password6 f. F# K. |/ ?2 p
- GetDriverFunc=getSQLDriverMYSQL* ?. j" \9 {' c$ D+ t
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0! J& a5 t6 M7 t4 j* h* K
- LibraryName=./libsqlmy.so B+ B5 ^$ J! M1 v, j4 h: p9 Q
- Active=1
: J/ e% F' u) x3 T - ---example---0 n0 U) m4 p: U, M0 R8 `$ [5 D
" X# ]8 Q; S, X0 C! }8 [- l) i5 ]- On a windows box, also running the MySQL server locally, it would be:* n% o0 W$ S2 S# P0 U( G6 I
- ---example---
: r& @. D! H6 r9 c, u$ V8 F - [DBEXPRESS]
9 s/ T3 c. C% }! g5 Y- x - sqldir=mysql_sql
. ?0 z/ G8 t3 _ - Drivername=mysql2 K6 `: L/ N9 M5 w" g0 v" N% q
- Database=test8 H% W! G. T8 L |( k& X2 Z, C+ r9 ]
- Hostname=127.0.0.1% o$ ~* Y/ R9 o- I' t
- User_name=testuser
2 c* A2 T8 K* m8 f+ q, w; l+ S! ?, c - Password=my_password
* Q0 M p, H5 \" T- a- r- z7 y! o - GetDriverFunc=getSQLDriverMYSQL& P1 W; t8 o# ^$ b$ }: ]4 z
- VendorLib=libmysql.dll9 o: S0 F% N6 \: ?6 U
- LibraryName=dbexpmysql.dll
9 r9 X- V/ N8 v# f: E - Active=1
) t7 |2 d Z, a - ---example---- D S, o4 s8 {) N
- - written 02.03.04 by pwk.linuxfan: F" y( ]$ I, j. X3 k- K' V3 j/ d
- 5 C8 M7 I/ J. M' m+ b
复制代码 |
|