|
|
麻烦翻译一下,下面这段文章:xhan ; B B6 q+ p' B2 a+ u: \; E
" B& Q8 L: Q1 U
- & \ L# b: v% A* F1 J/ n: j
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
4 F* R* | L8 y- C( } - / x' i; G S6 q( q7 L- m
- ### What we need ###* i0 q' O" B/ `; ?
- Naturally, we will need a MySQL server to store the data for us, this document
! j8 V" h0 a1 j. [( C& W" J - will not explain how this can be done - there are documents out there for the
3 _0 b, ?" p+ P; w - interested. The requirements include a (empty) database for TeamSpeak to use: \9 g( }: J, E% z+ \# L% ^
- and a user account (username + password) that has the permissions to do stuff
5 m2 Z9 A0 B Z - with the database. Additionally, you will need a vendor library installed on the
3 O; {+ ?4 N$ q2 d0 U - local machine, this came with my MySQL install.: T& j) A% ^7 x; k! s1 n5 O
- These instructions will not tell you how you might transfer your data from the/ u9 g, J: ~% F" n1 o
- SQLite database to the MySQL database, we start with a clean and empty MySQL
( w- g& r \' k% h- S% D - database.0 F: E$ f6 O) O9 s b
- Some users have reported ways to import a SQLite database into MySQL, but at$ Z/ v7 t6 b" A4 Y
- the time of writing, there are still too many issues - check the current status
0 c! w. R# x. c4 ~! W! \% x2 m - in the TeamSpeak forums if you are interested.6 V" A% x. l* b0 y# Z
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from8 G" ? f4 t0 N
- Borland was used. This driver can only interface with the client library that 6 [4 E0 R% g: }9 g. A% I
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this' d) L# z! u( b' O; b
- client library - basically all you have to do is to use a 3.x client library as
) E8 x# F: N- L+ B, X" A/ X - "VendorLib" and a 4.x database to connect to.& v+ Z+ e8 T/ x( |) r3 z
- If you need more info about dbExpress, you can contact Borland.
! F( r- Q1 z4 _8 {% q) W$ U, G - % H% t; w+ X3 x& e; `
- ### Doing the work #### b3 N3 g5 x. M) d- P
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 V! o1 u2 I! c' J9 S" U1 C
- the perquisites right, just open your server.ini file, and add this section at" O5 t! S5 T5 j5 z8 S8 B
- the end:
6 P, @1 W7 l* M4 [+ j& I% \ - ---cut here---6 P) t8 n! V# x7 w& v
- [DBEXPRESS]
2 ^7 t& g: Q2 M+ N# b - sqldir=mysql_sql
* ~2 T6 A1 F: q0 e5 N, d% W - Drivername=mysql
. w5 h0 g" c. q3 m - Database=Your_Database_Name_Here5 {; S1 B! x/ |+ `% d
- Hostname=The_PC_the_MySQL-Server_is_on
6 Y/ D2 z6 e1 c+ k- A - User_name=User_name_on_the_MySQL-Server! ^4 B- O7 R( u# I5 ~8 G4 a/ G
- Password=Password_to_go_with_above_user_name
1 f* i$ z |7 S8 C5 k, [ - GetDriverFunc=getSQLDriverMYSQL
4 a0 [* X9 d9 d0 X - VendorLib=path_pointing_at_your_mysql_vendor_lib" K( K7 ^5 n. L% z3 r
- LibraryName=path_to_libsqlmy_libary
# I. f. F# y. k, C. {8 | - Active=1
& U8 H) e9 ? B0 L. Q6 W( ? - ---cut here---
( i" P) z$ V" j* G - In my environment (a linux box with a MySQL server running locally) I have:! v- ~, d. Q+ a3 H; R5 G H
- ---example---4 k/ c5 A; c+ a! \- L, T
- [DBEXPRESS]
8 y" @. F9 R' \; m# s - sqldir=mysql_sql0 O. S, b2 Q! F e% T0 H
- Drivername=mysql8 g! I& s! R4 @9 |0 Q! f( W. x
- Database=test
# h2 z! [9 |- Y3 q$ H* P% `2 ? - Hostname=localhost
/ @" g+ K. x! B$ H! T - User_name=testuser
3 `. F0 X* t9 L6 Y* b, K D - Password=my_password
3 }- \7 l1 C1 r, C6 U - GetDriverFunc=getSQLDriverMYSQL i' e6 }/ X# z+ V. ^- G
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 g3 |6 t) \2 P
- LibraryName=./libsqlmy.so1 X$ B; A5 `( H4 a, K# C4 M4 R5 s
- Active=1
2 T; B1 j" \9 } - ---example---
9 Y, h: i6 k7 S" C" H
! @5 K* w# F' ?. o0 z- On a windows box, also running the MySQL server locally, it would be:& Z& r* F9 s B- k
- ---example---
; {5 c. J5 h. ]6 b4 m" \ - [DBEXPRESS]
6 ^2 M/ K. x! {% E/ Y" o - sqldir=mysql_sql' F Q7 D1 @% j, p/ X) w
- Drivername=mysql
5 Q- D8 J, o7 y! |5 F N' a+ U - Database=test7 {2 h/ d+ e: ?
- Hostname=127.0.0.1* e. e) ]: _5 p+ H2 p$ s5 {* h t
- User_name=testuser
7 @! f6 \, Z) C' ?8 |; S" Z - Password=my_password
$ l/ }! p, U) t2 l, u3 P5 x - GetDriverFunc=getSQLDriverMYSQL% x/ n) Z/ I& g: H
- VendorLib=libmysql.dll' p& G8 e& {- P
- LibraryName=dbexpmysql.dll
* X/ @, c- }0 O- p8 m! b# Y; G - Active=1* H) O$ L1 q5 A+ E: f2 N# @- b7 E
- ---example----6 O% M: i; Y9 K# C1 j, Y' M
- - written 02.03.04 by pwk.linuxfan
+ r/ o" f, O J4 B/ Y
+ `; T, I' ?) [: F- m; K2 m
复制代码 |
|