|
|
麻烦翻译一下,下面这段文章:xhan + h5 j) C: N; @; H7 s. D0 F
) W7 p! d Y1 o2 l. \5 Z- 9 Z" d- C9 I& |1 s9 S( U
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
4 M$ e, w$ d' M$ e) A7 ~
: ]6 _/ q! p1 @4 U' t* U- ### What we need ###, A: g% P8 C% V9 D# @
- Naturally, we will need a MySQL server to store the data for us, this document
! P; |- [+ `- n% U - will not explain how this can be done - there are documents out there for the
! E3 G9 k# S, P - interested. The requirements include a (empty) database for TeamSpeak to use8 b' o, C$ S U2 i8 R
- and a user account (username + password) that has the permissions to do stuff; }2 Q) O. M* u. M
- with the database. Additionally, you will need a vendor library installed on the/ }- |, p2 k+ I7 @8 Y" S
- local machine, this came with my MySQL install.
) Z( b$ ^1 e# Z! u5 m/ Y& v7 C - These instructions will not tell you how you might transfer your data from the
! ?- n6 \9 @. a- H' Y - SQLite database to the MySQL database, we start with a clean and empty MySQL, [5 h0 R4 q6 _
- database.; O' \9 \2 z. I1 A: b# D
- Some users have reported ways to import a SQLite database into MySQL, but at; }. e* N$ o4 y2 `" O
- the time of writing, there are still too many issues - check the current status1 P: c3 y A# z. h8 u2 S- o! x
- in the TeamSpeak forums if you are interested.7 T$ p) e2 ^& q; s0 e2 n o8 v
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 u, q! X" z2 J% a+ p8 F1 b
- Borland was used. This driver can only interface with the client library that
) U1 A7 f' E- x. y0 B! S- D - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this _9 j. B: v" i8 T! }& i
- client library - basically all you have to do is to use a 3.x client library as & X0 A( p; n$ G! p
- "VendorLib" and a 4.x database to connect to. G; D1 b4 e! d% H
- If you need more info about dbExpress, you can contact Borland.
6 A( u+ \" A- S: U' \
' o8 \0 l: s" L- ### Doing the work ###+ F$ Z" C7 a% ?( n
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all. M: J: _6 e# r" u7 w! t0 H4 k3 S. x
- the perquisites right, just open your server.ini file, and add this section at
X; ~3 V# E4 _. J/ L( d - the end:
0 o+ M) r! y7 d* X - ---cut here---, y2 P0 {1 _/ Q/ T- m6 U
- [DBEXPRESS]: ^* S7 a! n7 O5 x% H! B
- sqldir=mysql_sql
9 ~0 }) k- E: v2 \ - Drivername=mysql
, G! e6 N% @7 Y" L4 j* ^ - Database=Your_Database_Name_Here1 i3 O; j; N1 }
- Hostname=The_PC_the_MySQL-Server_is_on
8 E4 x9 Z6 @$ F, v - User_name=User_name_on_the_MySQL-Server
2 z: T; Y& y! @& { - Password=Password_to_go_with_above_user_name1 L/ N7 {; e& ? h& V8 P
- GetDriverFunc=getSQLDriverMYSQL
$ y$ t3 g. L+ T) P9 m8 p - VendorLib=path_pointing_at_your_mysql_vendor_lib
( G# p5 ^; g2 c4 I2 | - LibraryName=path_to_libsqlmy_libary
$ Z& X7 e8 V( ] t6 D, e - Active=1
; [9 I) H/ _, }1 t: _* d' f2 B; ? - ---cut here---
* C9 o! k2 R( S - In my environment (a linux box with a MySQL server running locally) I have:
. n5 k$ j' t! P2 h$ s3 R - ---example---8 ^$ r8 [5 z/ k# f8 D) Q
- [DBEXPRESS]
: [/ s* w8 b% X) y. ^ - sqldir=mysql_sql9 R' w+ Q. m, f7 c" z( Z
- Drivername=mysql
3 j/ |" m& y& f& U ^0 F - Database=test. d) O! `" v1 F, o
- Hostname=localhost
% `2 n8 [! Q% E7 O& w5 V3 J% ^ - User_name=testuser. ?/ I6 d6 n- ~: T5 P
- Password=my_password- Y1 f7 g. f8 Z& ~, U% X
- GetDriverFunc=getSQLDriverMYSQL, V- H8 y4 O! |8 }; }
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
/ b( ?# x" ?: I5 }8 K) X( ~7 N% l - LibraryName=./libsqlmy.so
9 |- E3 U; |$ P' a/ a - Active=1
2 Z7 h+ J; ]& e4 R4 m4 q" k - ---example---
9 o( i+ S9 K, ~. Q3 \2 \6 O# w - $ U: R& q4 [' g/ k2 O/ r
- On a windows box, also running the MySQL server locally, it would be:0 e. D, v& e0 l. _, ]- ^9 ?+ P
- ---example---+ e. s7 M5 I/ \5 J
- [DBEXPRESS]
. _. y: A# Q' M4 d0 J" B! J& y - sqldir=mysql_sql% Y& n+ M! k+ I
- Drivername=mysql
/ ~3 | D- c" }( `' g2 F' m - Database=test
' x' s+ Y T; i( Y+ N% Y - Hostname=127.0.0.15 G& }0 d6 C5 X1 e2 Y6 k% J L
- User_name=testuser, t. k( e2 Q) h9 F7 [4 j% G
- Password=my_password, ?5 u: J8 `2 B' w9 o8 o0 f
- GetDriverFunc=getSQLDriverMYSQL$ }( D$ |: t' k- r
- VendorLib=libmysql.dll9 E9 R. N( {/ q i. |, U0 i
- LibraryName=dbexpmysql.dll: B: g |4 ~& |/ T. C* D
- Active=17 Q) l" \8 B* N1 j+ u0 v& f" E
- ---example----
& _3 v& ~7 |$ k - - written 02.03.04 by pwk.linuxfan$ W! i: O$ N9 ^( {7 m- d
8 j, y4 D6 \) u' ^) V+ m
复制代码 |
|