|
|
麻烦翻译一下,下面这段文章:xhan ' d' _" k6 j3 ^8 H
5 L+ {; {9 o) A j" y4 M1 D
-
4 l2 C& X% }4 b3 s) e& U, j - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
# I8 Y2 F. m* y0 y
6 B* {$ U" a1 |* C" g9 W% }- ### What we need ###) Z6 l/ b# j5 P' A8 w& l
- Naturally, we will need a MySQL server to store the data for us, this document
+ P' y" M8 C4 f. ` - will not explain how this can be done - there are documents out there for the 0 }- L1 j1 E" {# j! D# `) N
- interested. The requirements include a (empty) database for TeamSpeak to use
6 K' l/ x- }2 ]" ?9 ] l' p/ C6 x - and a user account (username + password) that has the permissions to do stuff
$ R, U$ F2 ~6 Q1 L' y - with the database. Additionally, you will need a vendor library installed on the
3 H+ F' z( t9 g" B | - local machine, this came with my MySQL install.7 z- k8 D' ? Z: L2 Y: f( K5 ^
- These instructions will not tell you how you might transfer your data from the$ `$ f+ b) \6 V$ m! B- c5 P
- SQLite database to the MySQL database, we start with a clean and empty MySQL6 { u6 E1 a& e' U. L, Q
- database.
& P* ?/ J1 C8 J* I# W! ~* I - Some users have reported ways to import a SQLite database into MySQL, but at
- j' n% H4 S/ _5 K y& y - the time of writing, there are still too many issues - check the current status) U( f8 k4 H& n+ }' ^. e
- in the TeamSpeak forums if you are interested.
- A# g9 d7 c; |1 E9 K - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
; `/ f0 v2 y$ |. |" S - Borland was used. This driver can only interface with the client library that . a, N! u/ \2 h$ u4 D I7 I
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
- U" G6 \6 K5 ^% e7 _9 p& l - client library - basically all you have to do is to use a 3.x client library as
- `% i% |' ]) @4 u5 f8 D - "VendorLib" and a 4.x database to connect to.
/ q/ E! X4 a: {' |( }: _- m - If you need more info about dbExpress, you can contact Borland.
0 t3 S3 |1 x' N3 E6 |& L - $ c6 c! H, e/ G
- ### Doing the work ###
) L5 S- W" u# m! W% A/ h - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 V% Y* T! T" }. e
- the perquisites right, just open your server.ini file, and add this section at
) P# x( g$ g. g* @( w4 }7 P - the end:) K" S+ R5 J- z6 Q" Q
- ---cut here---* s+ L1 H1 S# b& ]3 W
- [DBEXPRESS]' Y2 X% F% a0 B! ]
- sqldir=mysql_sql
" J R v6 u# i& G% n - Drivername=mysql
9 z4 W. S) C' ?+ g7 Y! X - Database=Your_Database_Name_Here. R) H8 ^$ [9 e/ i
- Hostname=The_PC_the_MySQL-Server_is_on/ a+ u$ }% E7 w+ ]/ `6 i9 Q
- User_name=User_name_on_the_MySQL-Server+ q5 ?& n" u8 {( s( D$ d$ Y5 e; e
- Password=Password_to_go_with_above_user_name1 G+ x: X' @# s, b
- GetDriverFunc=getSQLDriverMYSQL# E2 p+ h7 ]8 k% ^! }; c8 m; j2 i
- VendorLib=path_pointing_at_your_mysql_vendor_lib
9 O1 `7 }) @3 E- q H! ]0 {5 U' ] - LibraryName=path_to_libsqlmy_libary; N3 O9 K. M1 p
- Active=1; e* u8 T( z/ S2 `) @1 }
- ---cut here---+ c8 {0 j1 [: K8 [
- In my environment (a linux box with a MySQL server running locally) I have:
6 G2 X1 Q' Z& Y$ ~$ n9 G$ c: N - ---example---
* _4 f4 u. L4 S% }6 w2 C0 f - [DBEXPRESS]3 `) X0 M+ Y( d* m' ]! r
- sqldir=mysql_sql+ U9 K( \# g9 C* Q
- Drivername=mysql
& ]5 I) h* x$ @5 X3 h# @3 i - Database=test8 S# P4 x5 g+ I, i3 ~; S% \
- Hostname=localhost8 ?& s2 p6 F- }6 u
- User_name=testuser: B. b( c% d n. _! Y6 X& l7 \6 }
- Password=my_password
# x% f5 q, f. z$ b; q2 V$ a - GetDriverFunc=getSQLDriverMYSQL R9 R% _3 B8 _) ^
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- V: n9 N0 k. h& l0 T, q
- LibraryName=./libsqlmy.so
2 }# M, k" P, n* Y7 s" } - Active=12 b, H4 v: J" H- x
- ---example---
- Q8 J; i; Z- p9 k: Q; j - 8 }3 w! @% F2 q, L- w: }
- On a windows box, also running the MySQL server locally, it would be:, `. A' z7 k' \& \9 e5 t1 r) I
- ---example---1 U% { e0 ~8 Z
- [DBEXPRESS]4 {! V. {& Z5 @$ L3 @( l
- sqldir=mysql_sql
9 G) K9 N5 ^* h - Drivername=mysql! D. j5 T) J Z9 R( P0 ]
- Database=test
' d9 i3 N( R" B3 f) c/ p - Hostname=127.0.0.1# N& [2 [3 {2 ]
- User_name=testuser1 u% u) J6 N B6 t
- Password=my_password8 F+ _0 z/ |3 ?/ G6 _0 J9 {
- GetDriverFunc=getSQLDriverMYSQL
/ | k1 r. B6 s, a5 g$ n) @) W" l+ A - VendorLib=libmysql.dll
( X' w' v4 x e1 ~2 z4 }9 j t# O' E - LibraryName=dbexpmysql.dll
& S. D5 B% y; k6 K, B - Active=1
; U; l8 c0 N2 L- @8 x - ---example---- M" h( n$ i+ @) \5 @
- - written 02.03.04 by pwk.linuxfan# ^! L9 J9 w8 u/ A1 [8 A+ O$ F
% e! x- M" w p; j8 Q
复制代码 |
|