|
|
麻烦翻译一下,下面这段文章:xhan ' @; q. N2 _& G, o3 r3 w
e! w! I. a* u
-
0 n) e) O# ^1 l) }- I, w' J0 V - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
1 e Q6 z8 P6 e4 o6 J
7 K& ?# Z' P K: m- ### What we need ###4 E& p9 v4 \1 U* P
- Naturally, we will need a MySQL server to store the data for us, this document
- `- k B* e7 S! R, y6 O% Q - will not explain how this can be done - there are documents out there for the
5 a" j/ p# I i T' G0 p - interested. The requirements include a (empty) database for TeamSpeak to use. M' a6 k% @( F- ^
- and a user account (username + password) that has the permissions to do stuff
0 K6 S8 y5 Q) V1 y - with the database. Additionally, you will need a vendor library installed on the
7 j# m1 X5 e; o - local machine, this came with my MySQL install.) z# P8 ^% {& N1 i7 \6 ^! K& J* K
- These instructions will not tell you how you might transfer your data from the. `1 [$ t5 D& | ~& |
- SQLite database to the MySQL database, we start with a clean and empty MySQL
D' n( F) @% q - database.% e' H" [+ ~5 v+ W6 G+ L
- Some users have reported ways to import a SQLite database into MySQL, but at! O) Z! o' y& a& l( w: { \2 f
- the time of writing, there are still too many issues - check the current status
0 y4 P; n( ]: E5 ? - in the TeamSpeak forums if you are interested.
& X2 k. H b% \, a - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. S& c4 ~1 \6 I9 x2 h! ? - Borland was used. This driver can only interface with the client library that # s! b: Q% D0 L' ^% O
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this: e' h& f: e" S ~( y
- client library - basically all you have to do is to use a 3.x client library as ( ?1 y! n, |) g" q9 T" y
- "VendorLib" and a 4.x database to connect to.4 P: S, G( v! o4 K
- If you need more info about dbExpress, you can contact Borland.; d' i0 u+ V. b8 M" J, l
- ' g% k4 p }& A ?; }) d" n: o
- ### Doing the work ###
3 i& y; i+ c+ W/ i% V7 h - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
6 L* L$ Z6 e2 k" y% |( g& z/ ] - the perquisites right, just open your server.ini file, and add this section at) c j6 b; r$ }6 @( }- E0 I" z0 L
- the end:
6 j+ F+ G7 J7 L/ ^$ ^ C - ---cut here---
4 k# s( V' a& U - [DBEXPRESS]
' U- t" A5 ^# }- k G - sqldir=mysql_sql; s) a( q k7 P3 M1 Q# F
- Drivername=mysql* x$ J6 c7 I5 F
- Database=Your_Database_Name_Here
4 J4 k J b6 q( q: ]+ x* h1 y' q" _ - Hostname=The_PC_the_MySQL-Server_is_on
2 u: Z- @% h) X' h - User_name=User_name_on_the_MySQL-Server
4 [; ]$ Q/ S* Q: x; w8 b3 T/ Q - Password=Password_to_go_with_above_user_name
8 \% Q9 w; o5 c3 x+ R3 N \ - GetDriverFunc=getSQLDriverMYSQL+ R' Z/ }- d. l- }* Q
- VendorLib=path_pointing_at_your_mysql_vendor_lib
7 M- E" A1 }$ }( {5 q7 g - LibraryName=path_to_libsqlmy_libary
0 [' X7 v- ~! _/ \4 [8 q2 q2 Y2 p* S - Active=1 e' N0 D& |: X; x
- ---cut here---- ~# C, }! y- n0 Z) h3 O5 r$ H
- In my environment (a linux box with a MySQL server running locally) I have:
3 }2 g/ G; @; |7 {/ k5 W+ J' w - ---example---( e" O/ u' u. ]- r1 V5 x
- [DBEXPRESS]% D; `: D/ F# v6 G1 E( D
- sqldir=mysql_sql& l! f" Q' l5 k, l
- Drivername=mysql" w0 \4 {$ i/ m0 T* i
- Database=test
$ W3 t2 t9 d( {) T - Hostname=localhost
* A! v; r3 i- s1 g9 G9 g - User_name=testuser J; T5 K" N7 w/ R/ Q
- Password=my_password
" i1 i0 W* t# M9 U% ] - GetDriverFunc=getSQLDriverMYSQL
0 x& ]! j. |0 P. y4 G/ a0 G - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0 l& {0 M+ @/ V) x4 x4 n
- LibraryName=./libsqlmy.so; ~/ n7 M, q8 l1 I5 ]7 U
- Active=1
+ F7 ?0 C H: d* i; y. r - ---example---# A9 I/ w& R: O2 Y/ a$ G t
( q# P" c% n+ E( z, X. a9 ~- On a windows box, also running the MySQL server locally, it would be:! H# r3 k, l: G) n j1 [7 \
- ---example---
/ d& {1 Q# I( c- W2 T& d - [DBEXPRESS]
+ p6 I7 [ p) S2 z - sqldir=mysql_sql* M& ?2 U4 }& F3 N3 W. U
- Drivername=mysql( w! E# f: k! v( N, t
- Database=test
2 O+ @; N5 ~4 S/ ^$ A& A8 [5 z - Hostname=127.0.0.1
8 p, ^4 O p. ~8 R9 R; F8 d% |8 Y - User_name=testuser: e0 H( D! q) p$ i A
- Password=my_password
( Q* f; I2 c/ |+ [, W' j/ f% n3 W! l - GetDriverFunc=getSQLDriverMYSQL2 Q9 N$ r, i! Z; v
- VendorLib=libmysql.dll/ W. y7 X- T) {0 y/ b9 [ i: `
- LibraryName=dbexpmysql.dll$ J! R& a0 G2 r" w8 Z
- Active=1
2 v: x. t+ q1 p/ y4 K/ d - ---example----
7 _5 _' x0 B3 o( C7 t - - written 02.03.04 by pwk.linuxfan7 J+ X, U& Z3 A
( h$ z& ^% k* q/ o9 p$ k. w
复制代码 |
|