|
|
麻烦翻译一下,下面这段文章:xhan
2 Y4 T' I* N* v; J9 A% n% L; x1 r4 U% @5 a1 H3 l3 M
-
2 e. E0 J2 Q2 M" X - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 f6 ~- O4 ^+ P9 d9 x
, P" l! j8 W; X0 v' t, f1 O- ### What we need ###% d% g1 H( |6 E% `, N+ B
- Naturally, we will need a MySQL server to store the data for us, this document
' f9 x* b& Q0 l8 ?! f - will not explain how this can be done - there are documents out there for the
- k8 k' ?, a+ s - interested. The requirements include a (empty) database for TeamSpeak to use
( I3 h3 l1 ]6 w - and a user account (username + password) that has the permissions to do stuff1 d/ B7 z0 x* E" s' j. ?. c
- with the database. Additionally, you will need a vendor library installed on the0 |% |, G' e# x2 w& c: [& D
- local machine, this came with my MySQL install.9 Z# T( n( W. p5 m
- These instructions will not tell you how you might transfer your data from the* x9 T; i( A( o# @$ o
- SQLite database to the MySQL database, we start with a clean and empty MySQL
6 R/ Y8 v3 ?( w& V3 y* A - database.
2 B/ S) p/ T" O8 u. N; F L9 d - Some users have reported ways to import a SQLite database into MySQL, but at
) \5 Y4 B+ [1 r) Y4 h0 A: K* O V! A - the time of writing, there are still too many issues - check the current status4 B% u- e" f& ]7 b: a
- in the TeamSpeak forums if you are interested.
4 R# R) Y9 M; b+ l - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
- g0 L" Y) Q# Q' ]- u - Borland was used. This driver can only interface with the client library that % q+ }5 T$ ]# d! r' O A
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this+ L4 ~: O: ~8 W' [+ x
- client library - basically all you have to do is to use a 3.x client library as
4 l4 _( ?$ \7 w0 b' a ]6 A - "VendorLib" and a 4.x database to connect to.- h* f5 k2 J* [) C. S7 Z: `: K
- If you need more info about dbExpress, you can contact Borland.
2 n7 V! V4 i( W3 }
w: w" h' u `0 ^) [- ### Doing the work ###
- I0 } ?+ ?# W6 M8 `# s$ V; k7 e - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all9 g Q% g- a( N( [2 G) _
- the perquisites right, just open your server.ini file, and add this section at
8 c7 T; j% L$ ^2 Z$ ` - the end:
0 ^+ h3 @! v# N3 ~4 ~! k - ---cut here---
+ s9 b. H, [ l3 j - [DBEXPRESS]
q- D* k0 W8 o1 |$ }# q - sqldir=mysql_sql3 e5 P. _% M" m/ E( ~# U+ d
- Drivername=mysql4 |5 z0 `+ \) G! i- V* I
- Database=Your_Database_Name_Here
1 T* m. e& y8 [6 Q. h - Hostname=The_PC_the_MySQL-Server_is_on
$ r6 E. e: u/ B9 L - User_name=User_name_on_the_MySQL-Server
4 @2 b, z% g1 @, a+ f s - Password=Password_to_go_with_above_user_name& W1 e; n. o3 v( S R
- GetDriverFunc=getSQLDriverMYSQL
8 a+ H$ T" p. S/ { - VendorLib=path_pointing_at_your_mysql_vendor_lib. V/ n/ D3 E5 }4 v t3 f
- LibraryName=path_to_libsqlmy_libary
2 G! v% }. I# i$ u0 U$ q - Active=1; c3 G: D1 d2 N7 w# F- L L
- ---cut here---2 M4 k2 b r5 |; R$ C5 f8 E
- In my environment (a linux box with a MySQL server running locally) I have:
. J% c2 x. \; d; q& V - ---example---( b, U4 w/ \* I# `9 G9 T) ^, L
- [DBEXPRESS]9 D q; m/ H8 u' x
- sqldir=mysql_sql! U6 J6 |' b( V6 | P5 }, P
- Drivername=mysql
8 G: `8 J; p. v! p( I - Database=test
: X+ Y0 H; E, q* {2 ~1 o! B/ ]0 l - Hostname=localhost
1 B$ s3 n0 k' N/ X: G - User_name=testuser
, B" g d% s# d# A' p - Password=my_password6 P6 K- k5 r+ E
- GetDriverFunc=getSQLDriverMYSQL
3 R* a. z7 v( |$ O: Y - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0' Z% ^! n' Z8 T4 L( M; f
- LibraryName=./libsqlmy.so: H7 ]: ~; p/ J( |5 P U
- Active=1
- h0 e5 }; \1 u; R+ W - ---example---! c( |0 E0 Z/ X: o
- " x, c3 s) C/ k+ d
- On a windows box, also running the MySQL server locally, it would be:
5 O. u" m- q! O( I* K4 G# N/ T, u - ---example---
" u9 D' o& p! H) D; I - [DBEXPRESS]
7 c7 j7 q* M8 h n2 S% H9 ~ - sqldir=mysql_sql: T- J( A5 ?* W
- Drivername=mysql8 h" @* I; J1 }) g2 ^
- Database=test/ I6 Q7 b( ?, X0 o. F2 h
- Hostname=127.0.0.10 l/ U/ E0 y! Q
- User_name=testuser! c. q) {% c! v) N; y
- Password=my_password h" T( D% c" `% I5 }5 e& d6 M
- GetDriverFunc=getSQLDriverMYSQL) S0 c6 m% W1 f2 U
- VendorLib=libmysql.dll
" Y5 B+ F3 \6 x9 T - LibraryName=dbexpmysql.dll
! P/ ~# n" W; C3 W, q- U. s1 a - Active=1
; s/ p( ?# a/ y- U - ---example----
; `: S, {) e8 R0 ~ - - written 02.03.04 by pwk.linuxfan; A) q, @! h+ D
. P+ _3 F( r' ?2 ]$ D
复制代码 |
|