|
|
麻烦翻译一下,下面这段文章:xhan 4 E/ f) r5 @/ ^
: b9 S) w$ R9 l( ?5 y- a# C
-
) B/ {3 I) x5 ~! _% o' s4 _% N! h9 F9 r - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######3 }* l* G% K$ B" Y9 f
2 z9 ?1 L f, M' m# e: I B- ### What we need ###+ i4 h: S4 \8 t/ P
- Naturally, we will need a MySQL server to store the data for us, this document 0 A7 K! x) U' ?. T# a0 G1 `9 d$ W, I, S
- will not explain how this can be done - there are documents out there for the
$ Y/ {$ c. X. q9 M - interested. The requirements include a (empty) database for TeamSpeak to use
% c3 e3 b$ j9 I3 v - and a user account (username + password) that has the permissions to do stuff b- B0 M& w, u# n2 c4 v1 l+ G
- with the database. Additionally, you will need a vendor library installed on the8 A8 ^' g3 o, n- N' |9 W( ]
- local machine, this came with my MySQL install.
- a& Q5 {0 K( S$ {# X5 M - These instructions will not tell you how you might transfer your data from the/ c- X5 P4 _( T+ q: k: x0 G
- SQLite database to the MySQL database, we start with a clean and empty MySQL) V) Y3 a0 ]9 w8 }* n, y ]9 J* m& h7 R' O
- database.
, a, T A- M0 v; n! e - Some users have reported ways to import a SQLite database into MySQL, but at% v0 @! `& Q% k0 a- A
- the time of writing, there are still too many issues - check the current status
( g% O' X9 }8 F( p' b, [1 ` - in the TeamSpeak forums if you are interested.# i7 v4 O+ V2 u% m% ?
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& G$ U1 L4 L7 Q, H/ M6 z
- Borland was used. This driver can only interface with the client library that 5 F1 [- {+ |( q$ b }- [: p
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this8 c! ?) [- {" t* G% U3 q8 p9 D
- client library - basically all you have to do is to use a 3.x client library as
2 `& I( @6 t, b& c- X" q, o - "VendorLib" and a 4.x database to connect to.6 {# u1 ~; j0 V2 J: h/ {
- If you need more info about dbExpress, you can contact Borland./ n7 C- H& A$ m# A! n
7 U5 b' y+ E F3 l+ P% e0 N R4 |- ### Doing the work ###! h9 n# j$ \3 ~( O" U; `
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: `6 D* m7 T+ s* i$ d# P, i- n
- the perquisites right, just open your server.ini file, and add this section at) l) P, G) O, w
- the end:; L$ C0 d7 u b8 n$ a8 y
- ---cut here---; b; q) M3 T% P# n) V6 B; G; ], h
- [DBEXPRESS]- [% B, y8 }: l6 g1 x
- sqldir=mysql_sql; m+ d* N( z& b
- Drivername=mysql }8 E" N! {9 v, D
- Database=Your_Database_Name_Here9 y5 |# \! L) i5 S" _" H# G
- Hostname=The_PC_the_MySQL-Server_is_on
/ ]5 I I+ z- ?! m/ v6 J; Q - User_name=User_name_on_the_MySQL-Server- a8 j- n( x m
- Password=Password_to_go_with_above_user_name7 }5 V8 I2 c7 ^# G/ c9 z
- GetDriverFunc=getSQLDriverMYSQL
" L8 {! d/ V% I) r - VendorLib=path_pointing_at_your_mysql_vendor_lib" m" K9 e Z5 y7 m; J3 A6 X# F
- LibraryName=path_to_libsqlmy_libary; Z! h2 g: `5 B9 |
- Active=1: R4 Z3 d& p7 I( J0 c, B$ B" B
- ---cut here---
5 h6 \/ C# A a- H O" G - In my environment (a linux box with a MySQL server running locally) I have:1 m, j) e( `5 K; q8 W2 R" o
- ---example---3 b% ]3 t2 ^3 Z; P
- [DBEXPRESS]
5 g, E; _' s8 R6 i* U, ^% Z* Z - sqldir=mysql_sql$ S" A, j( \" U! @
- Drivername=mysql1 l6 \7 p6 w2 C% ]2 d
- Database=test% m/ E+ O0 T: o4 e
- Hostname=localhost( @9 a: |% X3 G9 k
- User_name=testuser
& U( A5 h* T/ o- P1 c - Password=my_password
: [% S; O9 Z z& j - GetDriverFunc=getSQLDriverMYSQL' l! U' o8 @ u! w
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
9 M V2 i' D6 j5 O5 l, ^ - LibraryName=./libsqlmy.so
6 D: q. ?4 z" `$ \ - Active=1- c9 I" m- p d
- ---example---
4 @+ l0 u! X: X2 m" ~" Y, L - s8 I6 o1 Z8 @2 G3 I* }9 S
- On a windows box, also running the MySQL server locally, it would be:' H/ {4 `! y8 C3 g& W3 N# D. M
- ---example---) @' e0 g4 y& ?6 m* h
- [DBEXPRESS]
4 W) Q. s2 u9 ^ - sqldir=mysql_sql6 e0 b$ s, C! i' [+ ?! S M0 M0 [
- Drivername=mysql' Q, v$ g* e+ d9 o8 a
- Database=test* r' N D9 U6 j3 c3 ^1 ^
- Hostname=127.0.0.1
* y! G. ?1 y8 D) U- _( T9 c5 R - User_name=testuser
7 m4 n6 e; K! ~/ n8 n6 V, n4 m3 z - Password=my_password
* }% _: h3 ]# h/ L - GetDriverFunc=getSQLDriverMYSQL
# p7 Q* R: H( H% ~" D0 w - VendorLib=libmysql.dll0 X/ \* K1 o% p7 b
- LibraryName=dbexpmysql.dll
6 t9 \% W; |6 y l u" H; @ - Active=1
0 r$ s. ]& z: |$ c8 T - ---example----' x' Z/ F% f) b. A3 F
- - written 02.03.04 by pwk.linuxfan
) V; q/ S: L* A9 ~1 Y( {- o3 C - % ^6 e3 c& q+ X' j) W
复制代码 |
|