|
|
麻烦翻译一下,下面这段文章:xhan ( v" @. b( O* q, G8 J0 R
' s- o0 j& N5 R- K- 0 Q$ \5 E# q5 V8 X* s
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 u* j7 ?* g; |& l% {4 G - 1 J. o# M6 X, c6 ]
- ### What we need ###
" {! T3 `* F5 V4 O' r# j7 @# L% Q - Naturally, we will need a MySQL server to store the data for us, this document
2 E: A! |7 U! B - will not explain how this can be done - there are documents out there for the : s( J/ a( |7 i3 s
- interested. The requirements include a (empty) database for TeamSpeak to use x) {2 G0 Y$ h( k: J# F7 e
- and a user account (username + password) that has the permissions to do stuff$ r( S+ X# }# d. `7 x
- with the database. Additionally, you will need a vendor library installed on the
, y2 o/ I; e: F3 d - local machine, this came with my MySQL install.1 K# T* @9 r4 G( d
- These instructions will not tell you how you might transfer your data from the6 A1 D. G- [1 s) b
- SQLite database to the MySQL database, we start with a clean and empty MySQL6 b; i* } p& q# B o0 N
- database.8 A3 F6 W* C% h9 b
- Some users have reported ways to import a SQLite database into MySQL, but at
5 p8 j- N6 A$ r9 d6 V- s - the time of writing, there are still too many issues - check the current status6 j2 K' Y( w2 ]+ K
- in the TeamSpeak forums if you are interested.
1 K- q5 m" c, H/ V s - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
4 L* M2 ^8 l' g" Z: z+ {# h! { - Borland was used. This driver can only interface with the client library that 9 Z) w7 v. K* N4 C( ]1 b
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
5 [" V7 k+ E ?7 j% p3 s/ J4 R - client library - basically all you have to do is to use a 3.x client library as
3 T9 V% L0 B0 t) m - "VendorLib" and a 4.x database to connect to.: T2 t, b* S# H( F
- If you need more info about dbExpress, you can contact Borland.4 r% C& K3 o) S/ e0 N
- ; {; z( @* H1 _0 V2 ]; j8 g# z, o
- ### Doing the work ###0 ?) d( U8 F5 P) K8 `/ }3 C
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" r6 A. C+ P+ O& z# v7 n9 |
- the perquisites right, just open your server.ini file, and add this section at# ^2 ]* K4 X6 g
- the end:) }* ~. w" o# Z2 N! {: u0 }
- ---cut here---
$ ^ {1 @: q* c3 s1 u. N+ k - [DBEXPRESS]
7 {' ~0 x2 o4 f+ b2 { ~ - sqldir=mysql_sql
% A7 R/ q/ [5 h# r - Drivername=mysql' z8 T/ A( c! {( C1 t# q$ c! B
- Database=Your_Database_Name_Here
' E& E, S! ^* ]& x) S$ } - Hostname=The_PC_the_MySQL-Server_is_on
# p6 p5 P1 n+ a, j4 O/ } - User_name=User_name_on_the_MySQL-Server
1 u5 d5 T: H# ~( h- E - Password=Password_to_go_with_above_user_name5 j' \4 X6 Z7 Q( W \ M) h( R
- GetDriverFunc=getSQLDriverMYSQL7 A% M; b9 E9 B) n. @) X
- VendorLib=path_pointing_at_your_mysql_vendor_lib! z) G5 C) ~% N; u: i
- LibraryName=path_to_libsqlmy_libary! o9 |8 y( ~3 q& ?+ S
- Active=1
0 R2 `9 V/ V! F8 y8 \ - ---cut here---
2 V* e3 _2 k/ D+ r7 z# z6 _ - In my environment (a linux box with a MySQL server running locally) I have:( x; F9 @( _* n& z; j
- ---example---6 q# g. O" U9 E$ L
- [DBEXPRESS]' p9 e7 A. d, c$ J
- sqldir=mysql_sql
9 j/ q1 X4 \9 G" P3 N - Drivername=mysql
6 F+ Z( }! W3 R' e1 @ - Database=test" K' K4 q8 C: t/ R% e
- Hostname=localhost
+ a& U2 _) {! O$ m( S$ I4 b - User_name=testuser
* I# @* y( ^9 `3 w: Q) O - Password=my_password
" Z+ ^! w. r6 W% t - GetDriverFunc=getSQLDriverMYSQL `6 C! B3 \5 R% X
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 m3 p/ s3 ~3 w - LibraryName=./libsqlmy.so0 F" f+ L- K# d- D7 T' |; W
- Active=1
8 m- z- s% U, U6 {& R4 K - ---example---9 C& x1 k/ j9 ]: [
- 7 u* ~4 d8 M5 R A6 o
- On a windows box, also running the MySQL server locally, it would be: S6 P3 g6 \: i# y0 a: z
- ---example---& y* p- j; y/ Y, z0 q+ c
- [DBEXPRESS]
, ]5 I- Y' C3 j- |# O - sqldir=mysql_sql
2 {% z6 h6 S/ |+ @ - Drivername=mysql- [& t/ A: ?5 k3 s
- Database=test, h, T& Y# R& C( X: L" D
- Hostname=127.0.0.1
4 R9 y+ Q! L8 q6 H$ ` - User_name=testuser9 C' {# B6 Q4 B9 C# o, \/ g
- Password=my_password+ b' V* S# q8 F" k' h) M/ R, K
- GetDriverFunc=getSQLDriverMYSQL
6 l2 f9 C/ e) I7 g$ O; ? - VendorLib=libmysql.dll" l' ~; a; `; [- I
- LibraryName=dbexpmysql.dll+ [5 V* t4 o; q- @
- Active=1
2 e# p) C9 f7 G) A5 s% b$ M- w4 a4 L - ---example----
# \+ H8 T$ Y" m' Q - - written 02.03.04 by pwk.linuxfan" ?+ O" N4 y" p+ c0 ^
- # O, y3 k5 i& e8 e2 d, Y9 O+ I
复制代码 |
|