|
|
麻烦翻译一下,下面这段文章:xhan
0 [6 R( G4 r9 |9 S+ d' V% c8 v2 L0 i: w' Z
- ( ]: A6 \& X2 `% F
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######2 N( |% }. d: J" z! l) j
- 2 g$ P' o- x: p' S- m$ Q
- ### What we need ###7 v5 o/ q* i2 q0 {
- Naturally, we will need a MySQL server to store the data for us, this document # w, q* E8 n5 D2 i( @8 p
- will not explain how this can be done - there are documents out there for the 3 H1 M3 h# h9 ~. F7 K+ e
- interested. The requirements include a (empty) database for TeamSpeak to use- \- |5 t: r ^2 [
- and a user account (username + password) that has the permissions to do stuff( p' h% `2 M6 e3 w4 h W# v
- with the database. Additionally, you will need a vendor library installed on the
6 f; y. v9 Q { I, `" Q9 @, Q - local machine, this came with my MySQL install.
2 N0 I* p: K# f% K: M" l - These instructions will not tell you how you might transfer your data from the
, b2 R5 ~( r K5 B - SQLite database to the MySQL database, we start with a clean and empty MySQL" [4 q. {0 D q Q s7 S' C
- database.
% A% G- o* h3 U - Some users have reported ways to import a SQLite database into MySQL, but at
; n% j7 }. x. A4 q - the time of writing, there are still too many issues - check the current status
* Q& X& q( ?% d0 H8 S! x - in the TeamSpeak forums if you are interested.$ H8 x# x o8 u7 p: E
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from, U8 ^8 c4 p: {. R5 H
- Borland was used. This driver can only interface with the client library that
T- O, D% m |% L9 _ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
6 o6 L- y2 @: ~2 v% C# ] - client library - basically all you have to do is to use a 3.x client library as - |0 Z+ n8 N. C6 d9 ` z
- "VendorLib" and a 4.x database to connect to.5 s# j! w o* s3 |* @) w/ L. S
- If you need more info about dbExpress, you can contact Borland.6 {2 d5 ?& `" M2 F3 |6 s) j
- ; ]# z$ u, W+ S/ T k
- ### Doing the work ###2 k$ `5 D [( E7 L0 O1 j |
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# d, d7 X# c I* y- X! a - the perquisites right, just open your server.ini file, and add this section at
3 ~. [$ S0 a9 Q9 j" Q - the end:
2 m# ~" D2 K1 M i - ---cut here---& ^5 t) u1 ?1 T0 _/ h
- [DBEXPRESS]4 T: V/ R: m/ ~7 p( s6 G
- sqldir=mysql_sql5 U. x, ]9 c9 } q3 x" u, G
- Drivername=mysql
( P7 O1 B. m6 `2 j' O5 W$ Q - Database=Your_Database_Name_Here
4 x9 y4 o; ], O5 X% P - Hostname=The_PC_the_MySQL-Server_is_on9 U \' E' c7 Q8 Y
- User_name=User_name_on_the_MySQL-Server% L0 R" g& S: D5 R8 I
- Password=Password_to_go_with_above_user_name
1 G( f; S' i8 W# M& K9 x; w - GetDriverFunc=getSQLDriverMYSQL- C; }3 K7 j+ W; M, K8 y% m
- VendorLib=path_pointing_at_your_mysql_vendor_lib
9 k- d7 \& ]+ t8 W2 z! a - LibraryName=path_to_libsqlmy_libary6 j) n$ S& H% {4 ~$ B$ `
- Active=1) f( c+ x5 {+ K6 l% ^2 ~) _3 N
- ---cut here---
. R1 E) G1 [8 Q( e - In my environment (a linux box with a MySQL server running locally) I have:% i, p; ]( }: M+ t
- ---example---
! B- }3 D2 O, h - [DBEXPRESS]0 v' w! E8 Y: S, N
- sqldir=mysql_sql# p+ X5 a' w6 l4 F
- Drivername=mysql& i" A/ K6 T, Z/ e# K7 f
- Database=test
2 O( t m5 O; A( N7 x - Hostname=localhost. C/ n& `$ n8 ~9 h
- User_name=testuser
9 ^( [( R- @) [1 u8 l0 q& K - Password=my_password
7 |2 G1 {& g4 @2 Z, d - GetDriverFunc=getSQLDriverMYSQL7 V: P9 L% |9 H% }3 w P) t Q
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0! I- K* k. b6 v7 ?! {
- LibraryName=./libsqlmy.so* ^: Q; c9 v$ ~+ p1 \8 p- h# @5 j: s
- Active=10 C/ k/ p' F! Y
- ---example---
; U; I$ y- v9 L
8 _* R+ _9 K/ N* c* N( k( o- On a windows box, also running the MySQL server locally, it would be:
% z4 z9 ?3 n0 J# S |! `5 P. [ - ---example---
* |- d5 a& L0 R( p6 {* l4 A: Y - [DBEXPRESS]
! I/ I1 g) \5 v$ i - sqldir=mysql_sql
; T" Z7 C( ~1 R* ]- V; j: I - Drivername=mysql8 V$ B, v+ {! K9 N! ?" d5 J" @" Y
- Database=test% _, |0 U* V5 r, e
- Hostname=127.0.0.1
) `0 W, b% E. w- t/ k - User_name=testuser
, w4 g! r: s) m& F6 g* s - Password=my_password
7 K3 H4 W' \" A; j: a& P1 C- } - GetDriverFunc=getSQLDriverMYSQL& j5 B3 ?1 O# V# Q
- VendorLib=libmysql.dll
/ j* b6 G0 }/ _ - LibraryName=dbexpmysql.dll% F* c" S9 `- t9 V% i9 [
- Active=1' m4 z8 X: f4 t8 V9 V9 t! O3 v7 D; D
- ---example----6 d- V; |, N6 y' S6 L
- - written 02.03.04 by pwk.linuxfan+ s6 ?7 F7 j/ X8 \0 K D% U
- B3 b3 F" V- `) A7 A" [, t
复制代码 |
|