|
|
麻烦翻译一下,下面这段文章:xhan
' D+ d. ^# b0 F! Q; \5 p( l8 K# y. M T8 x6 ^/ w: Q
-
8 U6 u$ q8 L6 l" L - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
+ [! S) c6 w1 e7 Q
7 R% X# L" _! ~4 z0 x) p- ### What we need ###
( V# @5 _, N/ J, m* J# R8 t - Naturally, we will need a MySQL server to store the data for us, this document 5 E4 c; K% N( q0 u3 F
- will not explain how this can be done - there are documents out there for the
+ r3 ~9 O6 k2 {# g' O - interested. The requirements include a (empty) database for TeamSpeak to use
' n3 Y d9 U* P& g% W+ q - and a user account (username + password) that has the permissions to do stuff
0 x6 t) q4 a' i" f# @( x0 d4 y - with the database. Additionally, you will need a vendor library installed on the
M3 s% e" r6 K - local machine, this came with my MySQL install.
. X3 m$ ~; |- N# s0 [- U - These instructions will not tell you how you might transfer your data from the+ e R5 L* ?, }6 ]
- SQLite database to the MySQL database, we start with a clean and empty MySQL- T* i: W3 b) c" F" T" e { r' K) D
- database.
- I6 x* R, S( f - Some users have reported ways to import a SQLite database into MySQL, but at
5 G4 ~- O$ a7 n - the time of writing, there are still too many issues - check the current status7 T7 c$ h/ y( ?5 ]
- in the TeamSpeak forums if you are interested.0 w4 b; u; E" y& s
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from1 d! Q' z0 q2 u$ ]) n# y, B
- Borland was used. This driver can only interface with the client library that " |9 L& f0 J. J6 c: G
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this: r$ N* N0 j, Q6 T6 i" e. w0 r$ ]
- client library - basically all you have to do is to use a 3.x client library as
, J% ~5 P0 i2 y# n$ x) ~ - "VendorLib" and a 4.x database to connect to.- Y) |5 l5 }6 X K% m3 H
- If you need more info about dbExpress, you can contact Borland.( Y# Q' D7 T( S3 a5 C
0 ]' ^$ e$ I0 @; p$ d+ a5 z- ### Doing the work ###
$ O/ ?1 \5 ]! f, q% ]! z8 U - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: a, T1 s& V9 Y
- the perquisites right, just open your server.ini file, and add this section at
! `7 n5 M8 {$ k/ y: m5 u9 K - the end:* d- v" ^( `; [# @; f
- ---cut here---
$ W. j! C+ h6 B; t+ k - [DBEXPRESS]# b+ y- j4 z% Y" f: ]8 m/ f
- sqldir=mysql_sql2 f, H1 l; U0 @7 v& a7 z" {7 m! \
- Drivername=mysql
0 q c8 n& l, K1 L6 c* l, P& F - Database=Your_Database_Name_Here3 l2 l+ a( r @8 A
- Hostname=The_PC_the_MySQL-Server_is_on0 h3 ^" x7 G- j/ i
- User_name=User_name_on_the_MySQL-Server
$ B1 Q2 y; f0 s" h7 \7 {) H' [ - Password=Password_to_go_with_above_user_name
, o8 z0 k( j* |% F! q, [ - GetDriverFunc=getSQLDriverMYSQL9 Z! P3 v0 x% C* K. P
- VendorLib=path_pointing_at_your_mysql_vendor_lib
# W3 a9 \) h8 ^# R9 v& M) | - LibraryName=path_to_libsqlmy_libary( z% s6 E6 {( ?0 Q/ i, ^- H: {/ P/ I
- Active=11 _- e, [2 Z9 k, e
- ---cut here---. [8 c' T: Q) L9 \/ j. @$ @! h& }
- In my environment (a linux box with a MySQL server running locally) I have:
& q k! D% Q3 U) M. w - ---example---% l4 t0 Q* F+ a/ Z5 y+ @1 V2 c
- [DBEXPRESS]4 z/ W2 Z+ m9 `7 Z! E* |
- sqldir=mysql_sql
% o- x- j( d; W$ U( j - Drivername=mysql/ n) A2 K( y. S3 J
- Database=test7 `6 M. ~# ]& @" Z% T
- Hostname=localhost
- C# q$ x. N1 }' ] - User_name=testuser. q8 q! a6 u* S
- Password=my_password
0 q3 W) b v, t- g - GetDriverFunc=getSQLDriverMYSQL! J7 M3 n u' W, \2 G, l
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0; z$ T1 X% q7 V! D8 O" Q: g0 N1 k
- LibraryName=./libsqlmy.so# v) m. Y& _" m# Q" X
- Active=1
7 j' |! d0 Y- o) y. {: n - ---example---
' j$ R B" S, A ?
5 w3 {+ g; Z7 s- On a windows box, also running the MySQL server locally, it would be:3 d; {' o4 w6 h, e6 c% D1 t
- ---example---
; ^5 e7 k0 y% I; f - [DBEXPRESS]) v4 @' Y; i3 u, v; ]1 o7 l6 q
- sqldir=mysql_sql
& g$ ?. p: q& S: s3 U8 H - Drivername=mysql3 J, C+ [7 B3 d% v
- Database=test
! M( A" n Q) k. P! `) ^% g - Hostname=127.0.0.1
1 A* w" f0 s+ d, Z - User_name=testuser
3 |) T7 W0 X. G7 f0 e( r. y - Password=my_password; E1 n7 [" J& Q/ V% N2 g
- GetDriverFunc=getSQLDriverMYSQL
- E2 J( Y6 w# L7 u! ` L" m( R. b - VendorLib=libmysql.dll. I5 a% {) O0 l g) K
- LibraryName=dbexpmysql.dll
, n3 d$ u3 D' a, I - Active=1& V$ U6 i( v+ r, X7 m
- ---example----( T/ N9 P" F/ p. ?
- - written 02.03.04 by pwk.linuxfan* ^6 B$ {. G2 `. N8 y
- * z- q% k+ z8 S: }/ v
复制代码 |
|