|
|
麻烦翻译一下,下面这段文章:xhan
4 C* }1 T, p4 I6 u2 U! ~7 g9 E1 ]* c
-
- w3 U. r3 |! f- l1 b - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 D2 O8 o# |, X1 B1 C3 y0 E% g# B
" Q& B% l. ~4 ?0 y8 k+ r- ### What we need #### d) C& Q- I' p) n4 @: M) G
- Naturally, we will need a MySQL server to store the data for us, this document
7 f+ ?8 x* s+ M+ T- Y, c - will not explain how this can be done - there are documents out there for the
2 A* n& [; n$ h' ~& z% U" w - interested. The requirements include a (empty) database for TeamSpeak to use/ M: v, D7 @( _3 u$ a$ ?
- and a user account (username + password) that has the permissions to do stuff
, S9 V0 R& G1 I5 j - with the database. Additionally, you will need a vendor library installed on the! N+ I7 J2 O4 C$ ~
- local machine, this came with my MySQL install.
q+ X; q; \4 C y - These instructions will not tell you how you might transfer your data from the6 z- g; }/ ?4 |* b. R+ x$ y
- SQLite database to the MySQL database, we start with a clean and empty MySQL Z) f% `: V5 o5 m m
- database.
+ G+ ]9 w/ t5 ]# a) n - Some users have reported ways to import a SQLite database into MySQL, but at5 |' l" r; H; J( K* b+ v0 q
- the time of writing, there are still too many issues - check the current status
3 s/ C& ]. d3 H9 o3 y% a - in the TeamSpeak forums if you are interested.
) m! K! ~8 _5 I8 i6 M - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from3 r/ x; H1 X7 a. J, }$ `$ a
- Borland was used. This driver can only interface with the client library that 3 F8 P P: r' h
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
4 K5 b" n1 a8 ^/ } - client library - basically all you have to do is to use a 3.x client library as & O- e; j9 L( V c
- "VendorLib" and a 4.x database to connect to./ q! ~0 }7 B8 ?7 H. P
- If you need more info about dbExpress, you can contact Borland.
% l8 w ^: E: C$ b7 Z$ F! Y1 B; H( ~
& v. V1 s$ b X- ### Doing the work ###
# _- N0 R# |- R - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ x/ K2 t: Q+ g ]5 _4 T: ]9 Z" m! C
- the perquisites right, just open your server.ini file, and add this section at
, e' Q: w0 n8 e" |; ?& N - the end:
& Z q+ @) ? [- M - ---cut here---6 \% Z1 M; k$ k) T- y
- [DBEXPRESS]5 b7 ]. N6 s3 @. c( `, W9 }* H
- sqldir=mysql_sql5 P1 n- P" s; W: X( |& ^+ R
- Drivername=mysql
! }* w. X# M% u1 {9 Z - Database=Your_Database_Name_Here
) `. w# z1 L' r. m7 T5 W9 F - Hostname=The_PC_the_MySQL-Server_is_on
9 C% P9 L0 p5 }4 j, R - User_name=User_name_on_the_MySQL-Server+ G9 W) k7 m/ ^1 u2 |" b, B
- Password=Password_to_go_with_above_user_name, V$ t( a( e6 }! C
- GetDriverFunc=getSQLDriverMYSQL
+ d& x* c$ X- N' q - VendorLib=path_pointing_at_your_mysql_vendor_lib7 a6 }: r+ i8 _) \
- LibraryName=path_to_libsqlmy_libary; V. Y; O# q* `% y9 O& B
- Active=1
% X: Z0 l- q; Q' g: e) c+ Q U - ---cut here---' l+ B) }& R4 _ K5 G. v
- In my environment (a linux box with a MySQL server running locally) I have:
# k8 M7 M3 m* I9 Q- y6 ~- {3 J - ---example---" v2 m4 ~0 S9 T& s+ Y. f
- [DBEXPRESS]4 b$ i k, F9 K5 a3 z7 S% {( s
- sqldir=mysql_sql
# z9 p! V I8 S& t/ ^& _ - Drivername=mysql( x( E0 g/ Q7 J9 f! Y) ^
- Database=test
2 o. H$ W4 h/ N" u - Hostname=localhost
6 x+ d5 @* u8 r2 H7 Q4 Y; x - User_name=testuser
9 @/ F$ C7 A) w" r; p8 \8 q - Password=my_password
5 V/ C3 t# N% `% K) a - GetDriverFunc=getSQLDriverMYSQL# H4 e/ J! l% Y# T/ I
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" b7 b6 p% K" J! g, L
- LibraryName=./libsqlmy.so; |9 f! m- Q% o" {/ v1 b
- Active=1% g* G$ f* V1 M4 U2 N! \. h- A
- ---example---
1 {0 ~/ T; t& u+ u, N0 G8 ~ - - K* D1 J5 W9 }
- On a windows box, also running the MySQL server locally, it would be:
! F, R9 ?' |( C S - ---example---
; L4 y: R8 c4 @2 }0 V8 ` - [DBEXPRESS]
# Q2 \. v7 b; i9 s. M6 I - sqldir=mysql_sql! b. o# j5 ^( U7 Y, U5 {
- Drivername=mysql
2 q }2 e0 W4 D5 `3 z - Database=test, v% L/ T) p& H& { H: Q. D) ~, _
- Hostname=127.0.0.1
* L7 x; k% u4 M* c& _. k+ S- ] - User_name=testuser; o u) f% v; x8 m4 ?
- Password=my_password2 Z, `1 w6 S5 M2 R: u
- GetDriverFunc=getSQLDriverMYSQL
4 x3 E. t' V `4 p - VendorLib=libmysql.dll
2 U3 C" ~0 J5 o, ?' s- Q - LibraryName=dbexpmysql.dll+ b% F5 {& e7 r$ I; ~7 I* m) y
- Active=1
) n$ Q3 _- o' [ - ---example----
/ Y) t. z! _ E+ x; K8 \ - - written 02.03.04 by pwk.linuxfan
- V8 t% r1 d6 s
) A" K/ H' R% q. c8 z/ {
复制代码 |
|