|
|
麻烦翻译一下,下面这段文章:xhan $ k3 x1 m; Z: @/ j1 N# [) }
8 C6 ^, ^0 L& |# W-
+ G+ o) `# F, X4 t - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
* I5 K J T4 G. I( b
0 i) l" X8 Q. m3 I- ### What we need ###7 b3 i: u6 O8 O, N/ K2 o
- Naturally, we will need a MySQL server to store the data for us, this document 9 X6 g' ]; q2 U* m+ E$ `& ]
- will not explain how this can be done - there are documents out there for the 0 V2 ^ L) |* a% V
- interested. The requirements include a (empty) database for TeamSpeak to use. E0 \& M* S ^* y
- and a user account (username + password) that has the permissions to do stuff
8 y& ^9 S: J: u( ^. x' m! `2 r - with the database. Additionally, you will need a vendor library installed on the
, [0 S0 g0 t p1 Y3 x1 U8 s2 R - local machine, this came with my MySQL install.
5 i) S% M4 V" y0 k - These instructions will not tell you how you might transfer your data from the+ J8 K( G4 \8 K$ a
- SQLite database to the MySQL database, we start with a clean and empty MySQL
# d5 \+ N" J) ?, k' k - database.
6 o- P% K# s3 i! w - Some users have reported ways to import a SQLite database into MySQL, but at
* w _6 c; x4 L) Y1 d4 e% \( g - the time of writing, there are still too many issues - check the current status" r- i( X4 U5 ?% D* @2 [
- in the TeamSpeak forums if you are interested.
5 j7 H: V X9 M2 G7 Y9 E- d+ s - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
8 B- w2 x- O, u( c" G& C0 P1 P - Borland was used. This driver can only interface with the client library that % ^' P& f9 L9 f' N3 l
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
/ N8 ~5 J' k2 q# O+ B+ K - client library - basically all you have to do is to use a 3.x client library as
# [, {; y# q- P% f- k - "VendorLib" and a 4.x database to connect to.3 I2 l, x! }* ^5 d* m9 m
- If you need more info about dbExpress, you can contact Borland.8 R8 h9 c2 I; n
- 0 D% w9 F! q* `, [- s* y# w% A5 h, E
- ### Doing the work ###
7 X e. E+ j) ?' |' @ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 Z# `; q8 F3 x# R' ~% B
- the perquisites right, just open your server.ini file, and add this section at( f r w' |2 R5 r6 }5 b
- the end:
% _! V6 u' G" z - ---cut here---
2 G3 j- V" N+ K# H2 f - [DBEXPRESS]
. O4 H/ h' u2 b" T0 A; A, k4 B+ d - sqldir=mysql_sql$ m/ z: ~' O/ v
- Drivername=mysql) h! [" d. k' X' g& z+ T8 F
- Database=Your_Database_Name_Here
& J! v0 Z0 L1 j2 G: F6 _ - Hostname=The_PC_the_MySQL-Server_is_on
, l; |+ y6 N1 T- ?: ` - User_name=User_name_on_the_MySQL-Server
9 C7 @3 n; m/ H2 j - Password=Password_to_go_with_above_user_name) N- n) X7 E, t' [5 j" l
- GetDriverFunc=getSQLDriverMYSQL/ F: O; M3 `. P7 J
- VendorLib=path_pointing_at_your_mysql_vendor_lib3 c' f1 q. @# z( y2 [# b
- LibraryName=path_to_libsqlmy_libary
# Q: k6 d' g; L; a8 ~ - Active=11 D! `7 k$ G5 | a; [& W
- ---cut here---) @& @1 h" L8 C- A. q& [
- In my environment (a linux box with a MySQL server running locally) I have:
0 K- K* d5 f% ~+ }" I. i/ L - ---example---
) d9 C. K, N+ e, t% e1 s - [DBEXPRESS]4 k1 e2 I& _0 w y( ~# h) t
- sqldir=mysql_sql
9 X# e( ?% \+ ^( F: U" v R& ^ - Drivername=mysql2 l7 T2 [# Q9 k+ n4 j1 w3 Q8 g
- Database=test
) B6 D* t j. l' @# T3 @# ~ - Hostname=localhost
+ C# v6 S. T1 J, P7 Q$ `4 [8 }& J$ q - User_name=testuser
& m/ N( \. f0 S - Password=my_password4 I$ b3 y* i' Z( ?. Z F9 i2 g
- GetDriverFunc=getSQLDriverMYSQL2 E' B. W0 F( b4 `+ B9 j
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ x3 W8 ~! L5 {$ t$ R9 @9 {9 o - LibraryName=./libsqlmy.so
. N, Y: {9 X) n R9 e( Q - Active=1: R* x5 e, s! ]( O- p) B
- ---example---# E/ y6 l9 a, q
- , x* R1 \* X8 P, K% w# D3 |' z
- On a windows box, also running the MySQL server locally, it would be:
" `' N2 s8 t/ }3 E s - ---example---
( O! d, m" ~& J* ? - [DBEXPRESS]
" e9 ^- c8 L6 t% _3 ~( E - sqldir=mysql_sql7 z* f. Z9 G( n0 z/ z
- Drivername=mysql. p2 ~4 Y Y' w6 N% M
- Database=test! O. \5 Q" G$ u3 |3 C
- Hostname=127.0.0.11 p( A! |3 l& D) C( p* m# p
- User_name=testuser
2 p$ j1 a q% z0 ~% ]: v& v: S! ` - Password=my_password0 p! S0 n" g* R+ @
- GetDriverFunc=getSQLDriverMYSQL- h/ Z7 v# {. B4 R/ O$ s9 F9 `! f
- VendorLib=libmysql.dll
. W2 W! t" ^% n8 s- `" K - LibraryName=dbexpmysql.dll
' n- L' J* m5 W# y - Active=1
" }9 R3 [% r2 V. B& K: } - ---example----
* s/ R' ~2 x( a0 {; G% J - - written 02.03.04 by pwk.linuxfan
& Y2 `" c7 ~/ ]) b+ U; [
, x( L0 j3 M8 R7 g+ o- x6 `
复制代码 |
|