|
|
麻烦翻译一下,下面这段文章:xhan
/ K" K$ _' @) Q6 ~6 h8 w+ z6 y) T0 C
-
. W' S$ @7 [5 X: d4 m - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
' J4 v# v; q! |# D! k8 I - 3 G5 j. ~* l3 X- R
- ### What we need ###3 H1 }7 f, F, M. t. T" \* y
- Naturally, we will need a MySQL server to store the data for us, this document * v1 r3 N# d1 q' u
- will not explain how this can be done - there are documents out there for the
2 L0 Q6 Z0 x, `; x4 c/ ? - interested. The requirements include a (empty) database for TeamSpeak to use
" o4 b. r* H& D - and a user account (username + password) that has the permissions to do stuff
& _' P/ K5 J, x @/ r - with the database. Additionally, you will need a vendor library installed on the& d, h4 X" x2 Q' R0 P Q% z
- local machine, this came with my MySQL install.6 a9 @7 t, L) `3 v* d, \% i
- These instructions will not tell you how you might transfer your data from the" U, G( ~" o% n! D
- SQLite database to the MySQL database, we start with a clean and empty MySQL
# l. [& O: s- y' X8 n( X K - database.$ a* n+ K" u0 E* Y$ W& o5 y5 [' ~$ G
- Some users have reported ways to import a SQLite database into MySQL, but at
4 Z% {' [: m4 @ - the time of writing, there are still too many issues - check the current status' Z$ i3 V; T9 K8 t( R
- in the TeamSpeak forums if you are interested.- f. Y- d, \# j* L
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 E+ \/ }6 l) q8 ~& E* K - Borland was used. This driver can only interface with the client library that
; w! I! o; p& B: e7 V% U: ]( } - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this! Y" E0 j. ]) z2 ~3 H' U
- client library - basically all you have to do is to use a 3.x client library as 0 V! Z; [# j( \/ b3 B8 I
- "VendorLib" and a 4.x database to connect to.: h" y3 }- a. o, x, Q, z
- If you need more info about dbExpress, you can contact Borland., V4 Z1 l8 `2 p+ }4 x1 b; K
- + M* B4 v3 ^4 P$ |/ P( r- Q# |' I$ k
- ### Doing the work ###- v2 [' ^4 X' c, N' \
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
. P5 l) B8 d1 f8 }$ K - the perquisites right, just open your server.ini file, and add this section at
3 b6 i2 b) r( X* |2 i! n+ Z - the end:
3 D5 r& ^7 T$ P4 _3 f) H - ---cut here---, T1 L" |. L! T" d& {
- [DBEXPRESS]
3 a/ J) m7 o. |: P - sqldir=mysql_sql6 ]2 ]$ I: L, Y9 r" `* g
- Drivername=mysql
$ E: \" y, z2 M; B9 D: n3 Q1 M - Database=Your_Database_Name_Here
- I' q7 `5 N: Q - Hostname=The_PC_the_MySQL-Server_is_on+ @9 v; x# b1 p! D' F$ U
- User_name=User_name_on_the_MySQL-Server
* x- @. Q. |& m8 w- h - Password=Password_to_go_with_above_user_name
6 {# B0 T. j5 g6 I- i - GetDriverFunc=getSQLDriverMYSQL1 I- p6 w/ | V! S: ~' N( l, S- w
- VendorLib=path_pointing_at_your_mysql_vendor_lib; q" S* w5 A8 S; R1 I5 j S
- LibraryName=path_to_libsqlmy_libary
+ P X- |: E( q3 R2 U - Active=1
5 p' y. d. X$ F - ---cut here---
2 g6 x/ _( ~) u8 R# W, C - In my environment (a linux box with a MySQL server running locally) I have:" v6 P) Q: _' A4 X2 F% Q
- ---example---# V) Z }1 z3 ]- l
- [DBEXPRESS]) K8 S v/ z8 R1 p
- sqldir=mysql_sql; x+ e. H7 X5 _
- Drivername=mysql
' t' b8 s3 P+ _ - Database=test8 J8 {/ A9 p S& g5 l- ? h3 {. \7 U
- Hostname=localhost+ V( U W, T$ q2 P. A* U
- User_name=testuser
5 y1 ?# z! Z. m - Password=my_password; E" }, H0 K+ }
- GetDriverFunc=getSQLDriverMYSQL
; S7 K" P2 ^+ p8 d - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ k2 t* q. R9 t% c1 C" H; V
- LibraryName=./libsqlmy.so
6 h% J" Z) b6 c- [ - Active=1
6 a3 `" z7 S; S2 o- z9 ~/ x$ ? - ---example---
, W/ l3 J' s, }, x( A - ( P2 n$ I: ~8 d" T! Y/ ^5 g
- On a windows box, also running the MySQL server locally, it would be:$ k: W$ u. T5 R. ^
- ---example---
- D" v# N3 X& K0 [6 L) { - [DBEXPRESS]* Q) |" c9 y' M4 B
- sqldir=mysql_sql
$ M& b6 I' d: I6 T) n# ]. V - Drivername=mysql
$ G7 n# H2 A1 ?6 v- s! [2 w* C - Database=test
, y1 D. a* u0 p" B+ n - Hostname=127.0.0.1% ~8 f8 G: \- `+ b- _% O
- User_name=testuser5 ?- t/ e8 Y- E( Q+ y2 e8 \
- Password=my_password' i: ]& C/ L) G. p3 J; X+ p% c, W
- GetDriverFunc=getSQLDriverMYSQL
8 j% v" a. C! k$ C4 W( l - VendorLib=libmysql.dll d% [" Z U( U0 M
- LibraryName=dbexpmysql.dll8 B. \3 e+ C. P8 j ^4 l' }5 N" T
- Active=1
# d8 `3 a. p& \) F - ---example----
/ [4 V) d3 x8 W+ r0 r1 q - - written 02.03.04 by pwk.linuxfan
3 [! s5 ~4 I# q. a# f - ( j0 t( m7 l3 j$ D
复制代码 |
|