|
|
麻烦翻译一下,下面这段文章:xhan
! C' O+ X- H5 S! Z/ ^. M
. {% g( w5 v& I8 b5 ]' A* T* _+ O- ; H6 w, O, W" f- F8 q# s7 g2 [
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######0 W( g* P5 Q" V% ^: ]3 [- W
- : V$ h6 V& V7 P3 U
- ### What we need ###
5 e4 Z& p2 J. ^5 H& ^ - Naturally, we will need a MySQL server to store the data for us, this document # m4 G" R0 C/ [, o
- will not explain how this can be done - there are documents out there for the . F1 a; J* s `2 P+ u
- interested. The requirements include a (empty) database for TeamSpeak to use
; g, H! N/ w5 S+ y; H+ ? - and a user account (username + password) that has the permissions to do stuff
3 h- Q1 B. I6 k! j2 ^ - with the database. Additionally, you will need a vendor library installed on the
# E* M+ L! y# W- E% E( D b - local machine, this came with my MySQL install.* c2 i' Y! s2 N! T- L0 N
- These instructions will not tell you how you might transfer your data from the8 o$ `8 F Z, t" {
- SQLite database to the MySQL database, we start with a clean and empty MySQL0 S* D% N; D! v* m4 l8 }8 e
- database.+ _: I4 G9 y+ ]# u* |* Y
- Some users have reported ways to import a SQLite database into MySQL, but at5 _8 D& i7 ^# O/ { B* c
- the time of writing, there are still too many issues - check the current status
6 E+ h3 o9 w9 X+ x8 T - in the TeamSpeak forums if you are interested.
+ ?( X0 H& e1 o( P. Z+ B5 } - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
5 V3 j3 T, J$ L8 r0 ` - Borland was used. This driver can only interface with the client library that " G" n, Z) k) t; I6 E
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 E# y5 M$ Z3 `; t: g/ Y% c5 o
- client library - basically all you have to do is to use a 3.x client library as
& g" _+ U% C/ i- h7 z - "VendorLib" and a 4.x database to connect to.2 _' [ C7 C7 j* B. D9 T
- If you need more info about dbExpress, you can contact Borland.
0 q# ]' k5 Z0 b9 U% ]7 r3 \
$ o5 U0 ?5 b* c4 [* b$ D" @; ]6 \; c- ### Doing the work ###. J( i. y" T, b
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
6 A& J" `/ f. R0 a9 I% C - the perquisites right, just open your server.ini file, and add this section at
: w3 O- T7 v+ i1 `; X0 G+ @7 }9 G0 b - the end:3 Q1 u3 I6 S, ]) u* f0 [% a" u( l
- ---cut here---
3 S4 O7 W+ ^: T! {# J5 | - [DBEXPRESS]5 \% k4 q |& V. k$ m! v0 ?5 j
- sqldir=mysql_sql
7 y/ j" n- Y8 t) N9 u+ F* p& c# x - Drivername=mysql3 J4 m: {& ]/ H; }
- Database=Your_Database_Name_Here1 H# n) f; V9 S' w4 f- K' n
- Hostname=The_PC_the_MySQL-Server_is_on a& z! F4 R- {/ d
- User_name=User_name_on_the_MySQL-Server
" Z! E) \$ h( w3 u5 w( q1 u - Password=Password_to_go_with_above_user_name0 X6 J" I/ P1 o7 e7 s9 s, Z, c# |
- GetDriverFunc=getSQLDriverMYSQL
$ y2 m2 U( R. i6 m/ J - VendorLib=path_pointing_at_your_mysql_vendor_lib9 A! e! [% R, g/ ^
- LibraryName=path_to_libsqlmy_libary
" u# f* T$ d6 ?4 w( H/ r |* _ - Active=1
' t9 k0 M& @% I - ---cut here---
+ b( P/ n. P; S$ e1 K - In my environment (a linux box with a MySQL server running locally) I have:
! Q7 V* N7 N4 H7 K4 z' E8 [ - ---example---8 H# N3 a; q& {, e' T
- [DBEXPRESS]& n. s' w! q. a6 V$ o$ T
- sqldir=mysql_sql
& K& z* Y+ C' L6 m: X/ q - Drivername=mysql% C7 m3 Q+ U9 z5 E3 ?7 @& d8 N- L
- Database=test! \* `1 K9 q8 P% f8 k
- Hostname=localhost
& Z7 d* Y7 m: F1 w! W) p+ K! |+ k- y; c - User_name=testuser
5 \! o. z9 C" N# X - Password=my_password
" U3 V1 t! E' h) O - GetDriverFunc=getSQLDriverMYSQL
& `6 D Q) g& n; L( \$ Z - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 g0 y' x) o5 @ - LibraryName=./libsqlmy.so
; C; ~/ s# E6 b - Active=1
" }& _& T* M. `6 M$ x - ---example---
# ~ e1 M T {9 c - + ^1 O( F: T2 O4 P# d
- On a windows box, also running the MySQL server locally, it would be:2 b( w ~; p. ^9 B" p+ x6 a Q* _, e! A
- ---example---
- p9 }7 L7 o; V8 p7 y - [DBEXPRESS]
6 y' ]0 V! e8 k+ g) [1 Q - sqldir=mysql_sql) f+ L: F- x/ Q* I1 u, [6 v
- Drivername=mysql
: }! k6 V6 d' J* K9 S$ N' P) O1 A - Database=test$ H; S9 [% ^# w% T9 N* l
- Hostname=127.0.0.18 p% L) r3 u' R2 H
- User_name=testuser, c! E' F5 z: v& k$ Y0 b8 q
- Password=my_password
" {1 n p' J. u - GetDriverFunc=getSQLDriverMYSQL2 [: \$ E. _: T9 c0 Q$ N9 L. J
- VendorLib=libmysql.dll) X( z0 J! E {- A8 V [& u4 v
- LibraryName=dbexpmysql.dll7 r$ D; G. ~! a* ~" Q0 L
- Active=1
4 H6 C: f/ e% T! F - ---example----
3 p- N n* m- a6 x - - written 02.03.04 by pwk.linuxfan( g: V+ B7 Q) a1 J
" \- C) t* A8 m2 b) r! G; f
复制代码 |
|