|
|
麻烦翻译一下,下面这段文章:xhan 8 O/ ]% F2 F( U+ g, X1 ]- F
1 ~* p, H- k9 V. W' _9 o% e
- * [) j r9 n; w5 i. z
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######' |3 U% F# g! B. c J g6 V1 s3 b
* x- e5 N! f9 W% h& d; g9 p+ e- ### What we need ###
8 c' o/ F8 x, h9 h3 Z" Q - Naturally, we will need a MySQL server to store the data for us, this document
( N& C7 J' r5 c* V% b - will not explain how this can be done - there are documents out there for the
5 b' M" @! b5 ^& D" r$ Z - interested. The requirements include a (empty) database for TeamSpeak to use
7 {9 Q/ P; U0 ~/ y; u - and a user account (username + password) that has the permissions to do stuff
, e- q/ I9 t! {7 f) P- M. B - with the database. Additionally, you will need a vendor library installed on the/ [3 T5 ~$ e( T# O% W2 | c
- local machine, this came with my MySQL install.; u3 S; S# r2 o* ~6 R) _
- These instructions will not tell you how you might transfer your data from the* x$ A3 e1 }3 D P- [
- SQLite database to the MySQL database, we start with a clean and empty MySQL
( w, A2 h W7 F - database.' C5 b9 R2 @8 `1 q, r( u: G& m! D
- Some users have reported ways to import a SQLite database into MySQL, but at
( k' U/ J- H: J7 {* j1 @1 ? - the time of writing, there are still too many issues - check the current status
1 T4 u( w; E% g) P2 a | - in the TeamSpeak forums if you are interested.1 H) t& O7 d2 S
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
I; R) E ~2 Z8 E/ L* q, ? - Borland was used. This driver can only interface with the client library that
! O+ N$ B) ]7 v0 j4 l3 D9 U - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
( ]+ F/ Y" F# @8 L2 m - client library - basically all you have to do is to use a 3.x client library as 2 @ }: G* u& d
- "VendorLib" and a 4.x database to connect to.& K F! t! Y1 r+ r7 o( v* F0 e
- If you need more info about dbExpress, you can contact Borland.0 f F- F6 g4 T) X6 i& H
- 6 `. F6 u1 E8 Z
- ### Doing the work ###
0 z5 [) c$ m# r- Y$ ^; Y - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
( a$ I+ _, R- _# \" V6 w2 L$ g - the perquisites right, just open your server.ini file, and add this section at
# Y+ e; P& |4 b& \6 K/ L2 i - the end:
; N% y5 ^ E9 |9 D$ ?* G& b - ---cut here---, S I1 [$ x l; g3 D/ G1 V* v
- [DBEXPRESS]
6 f+ a+ G! ?9 r, I& g o+ } - sqldir=mysql_sql
0 n4 K _! A% z9 j/ a) A - Drivername=mysql
; w1 r2 u0 B* Z - Database=Your_Database_Name_Here3 \$ W/ f. X1 b0 O% O8 r& A
- Hostname=The_PC_the_MySQL-Server_is_on
8 b# O) |+ ^! I" e2 S - User_name=User_name_on_the_MySQL-Server5 E) [% C, P4 Q2 q) K% t$ }. K
- Password=Password_to_go_with_above_user_name6 H# H4 r5 o* J5 {8 u* `8 A+ m" R
- GetDriverFunc=getSQLDriverMYSQL
2 v& O+ w z/ K J - VendorLib=path_pointing_at_your_mysql_vendor_lib
' @$ C3 r3 {: C5 ?& x - LibraryName=path_to_libsqlmy_libary2 v% A2 r- {$ D$ V! M( ~# t+ G1 m
- Active=1/ m7 ]( l7 B9 d5 V5 r
- ---cut here---, J. R5 p" r1 y* H; Y( b
- In my environment (a linux box with a MySQL server running locally) I have:: z5 u6 S/ u2 i; t7 M2 g
- ---example---
9 a7 _6 A# G; z5 ?. a% X1 Y - [DBEXPRESS]% r7 r; @* O1 c! t% d2 O
- sqldir=mysql_sql" }! A: L+ p/ B
- Drivername=mysql6 N, f- @: Z+ w" ^2 j. @
- Database=test# T! R9 t3 f- ~, m
- Hostname=localhost
! E) j9 u& Q% k, v - User_name=testuser
9 B) ~0 N' s6 E) ~, y - Password=my_password
+ v+ X" V$ e0 ]$ U$ S+ \! k - GetDriverFunc=getSQLDriverMYSQL5 {; _5 s9 o- s) W; @% Y# }
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. Y% q! o$ x# i( N0 N, f
- LibraryName=./libsqlmy.so v* V. W1 n0 e
- Active=1
- ~9 H$ q: k% w6 n; z - ---example---
9 u( W( i& ]8 O! y - & P- }% P) A5 W; m' E% k8 t7 M L& h
- On a windows box, also running the MySQL server locally, it would be:
. b3 Z- e* B: z+ c9 p8 Q - ---example---
3 m+ u" o9 L# N- d' F - [DBEXPRESS]" b* }# P y# ]8 Q* a
- sqldir=mysql_sql/ d7 R2 K& }# @+ _
- Drivername=mysql
0 K8 a0 p3 a6 F3 S! d9 P5 R. U - Database=test
! }+ G! c. M' n3 a3 n3 S l - Hostname=127.0.0.1, y/ H) K( h( [
- User_name=testuser
+ _% l. u C% p+ G6 F! Q- \$ { - Password=my_password
; `8 |/ v G8 A8 X) \9 E( Y/ u1 D - GetDriverFunc=getSQLDriverMYSQL
9 D1 P6 x7 j# g" U3 }4 u7 ~% m - VendorLib=libmysql.dll
% J' m) G! ]; y: J5 ~. | - LibraryName=dbexpmysql.dll
6 i; `6 I3 z( r - Active=1$ U% S6 H, {* n! U3 k4 ^
- ---example----4 ]! C0 B, D2 x d3 M- D
- - written 02.03.04 by pwk.linuxfan
* v0 i( b6 D/ w% L. Q
# v) i% o! L* u# J0 I8 i9 O& J% L
复制代码 |
|