|
|
麻烦翻译一下,下面这段文章:xhan ( ]& h+ s" z; z' i+ l
; [5 h* |5 {. @$ c-
, c2 m* t. D7 D1 Z% x3 H9 v - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) q7 t% Y6 S9 `; d& y
- 4 P: ?/ g7 Z" u
- ### What we need #### ?$ F6 ^/ Q3 L- g0 `
- Naturally, we will need a MySQL server to store the data for us, this document
/ G4 S$ {& D9 f - will not explain how this can be done - there are documents out there for the 2 {4 Q# N0 z9 c' p' j% }, e# B8 y
- interested. The requirements include a (empty) database for TeamSpeak to use
9 i1 ^4 P+ L) p3 ] - and a user account (username + password) that has the permissions to do stuff5 D9 g$ B9 ?0 v6 y2 L) n
- with the database. Additionally, you will need a vendor library installed on the( I- f+ J4 e0 u' M
- local machine, this came with my MySQL install.& ~4 y: a; ^: |# v
- These instructions will not tell you how you might transfer your data from the
0 o' H5 x; O, U9 J: l$ l/ w - SQLite database to the MySQL database, we start with a clean and empty MySQL
* i$ Y% _/ p; E3 g6 h9 G - database.0 Y, y. L( H3 T( I
- Some users have reported ways to import a SQLite database into MySQL, but at
5 b/ \ g5 _+ w2 Q2 d/ R" _ - the time of writing, there are still too many issues - check the current status
' @& \0 O S) x9 M. K1 |; J - in the TeamSpeak forums if you are interested.
7 z# |5 a2 {4 v7 m - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 l/ j" {" c1 h; r1 q: j
- Borland was used. This driver can only interface with the client library that ( J0 x- K: Z$ w( T4 N
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 L( D- z+ w H, i1 V5 Q - client library - basically all you have to do is to use a 3.x client library as
' O& t. f( w1 Z( J+ S) e1 g - "VendorLib" and a 4.x database to connect to.
- I5 c8 u) p4 }7 r8 Y' E5 Q - If you need more info about dbExpress, you can contact Borland.
/ d) M# V+ s8 W9 j7 R - + Y, T0 b( f( h% v; W
- ### Doing the work ###; l) }; q& r! C( @$ p
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
8 |( q% |$ P1 h( y2 Z: z - the perquisites right, just open your server.ini file, and add this section at7 S* P; [* ]- C: R. T% u: U* N
- the end:
~ }: k. Z) u: W - ---cut here---
5 s9 d# I) _6 y1 f1 z! m - [DBEXPRESS]
( Y4 m5 P% L4 a+ Z- R - sqldir=mysql_sql
" b X/ e: T! ]4 E/ z+ G - Drivername=mysql. Q/ j% r* J8 j6 |3 b+ f% }
- Database=Your_Database_Name_Here
( \7 E% f. o x D. f# e @+ r - Hostname=The_PC_the_MySQL-Server_is_on
. q: B5 J$ H8 q4 Q+ t - User_name=User_name_on_the_MySQL-Server
3 r1 X. h1 F, L ~1 C - Password=Password_to_go_with_above_user_name
' O/ m" _) ~* X& H/ y - GetDriverFunc=getSQLDriverMYSQL
l e! ^4 j2 Y1 U0 n - VendorLib=path_pointing_at_your_mysql_vendor_lib; |4 d# P+ r. M: v
- LibraryName=path_to_libsqlmy_libary
+ E5 a' i/ c" H& @1 h2 E - Active=1' `- n3 @2 `7 n l' @0 I
- ---cut here---
: T% w9 N( f7 @$ v$ v - In my environment (a linux box with a MySQL server running locally) I have:
8 b- O! F8 B: \5 j, [. ^ - ---example---
/ a# C* X6 Y; u! k, e; o1 k - [DBEXPRESS]0 E/ S- E! p$ u# J! c. v
- sqldir=mysql_sql
9 b* j. h+ A" J" a# g - Drivername=mysql6 A& z( n$ a" p4 C7 A
- Database=test
5 J/ K/ D0 K( [ - Hostname=localhost
" e7 b$ \ X- c2 x' G( D' t2 z - User_name=testuser
8 p! l* B8 M% V" S+ |3 V - Password=my_password
! F7 F. ~" \- [6 ?2 b7 d: A - GetDriverFunc=getSQLDriverMYSQL
+ ~6 Z# s( }( r3 s& L- C/ ` - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, r; O) E: t. V) |6 m
- LibraryName=./libsqlmy.so
* e; }, r; K1 l- ~ - Active=1
* f- L- J$ z6 w9 Z5 B, W - ---example---
4 j/ E: T. Z% x" | - 9 v( m8 W0 w+ p. z( C5 S
- On a windows box, also running the MySQL server locally, it would be:
3 H/ \9 U2 U5 v2 O& C - ---example---
$ P9 F$ G, ~6 O/ n/ h, X - [DBEXPRESS]
2 x6 _4 N4 r( E& s2 l& `. F - sqldir=mysql_sql5 g+ a, W, ]; g
- Drivername=mysql
S& d# H5 e( _( y+ R - Database=test. A, \7 m/ g7 r2 @9 X
- Hostname=127.0.0.1: z' y- O$ ?* f# `2 J, l6 u
- User_name=testuser
: I! a# H! n' V- D) ~; y - Password=my_password2 P6 P; m" p: u$ L b0 f3 ?2 a
- GetDriverFunc=getSQLDriverMYSQL
3 V) n- D( x- W8 `9 Z - VendorLib=libmysql.dll
0 W. Y8 W( Y3 C3 q, z" g - LibraryName=dbexpmysql.dll
/ z/ V& r8 b3 [' H6 F - Active=1
. t( A7 o5 a) I: g: Z& r - ---example----
# _( v9 T' B" {% J, `3 R - - written 02.03.04 by pwk.linuxfan% I. W, I/ e: `& ~8 x* K0 ]; {' y
- ~& _5 e+ G8 _2 m2 W! h
复制代码 |
|