|
|
麻烦翻译一下,下面这段文章:xhan
# F6 l( n4 W! m2 e# Y
/ U% q! @% w! q, V% O$ P- % b, F5 P( n" v( x0 D6 W
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; |( ~) h! m, A8 G/ P
% y3 r, i/ w2 M/ X% W% r- ### What we need ###! e" h B1 ?# s6 D) h' X' r
- Naturally, we will need a MySQL server to store the data for us, this document 7 b" q' ~$ [$ k. P+ @
- will not explain how this can be done - there are documents out there for the ! K8 T: c2 H: }, W. ~+ g
- interested. The requirements include a (empty) database for TeamSpeak to use
% ^/ w2 o3 N# ?& Q - and a user account (username + password) that has the permissions to do stuff
( L$ }! F3 Y0 y9 E - with the database. Additionally, you will need a vendor library installed on the$ B9 o" g* F* ]% E# w D: u% y
- local machine, this came with my MySQL install.! {6 l8 _$ }8 N d. |1 v
- These instructions will not tell you how you might transfer your data from the
3 ^' e; C* Z! G& h2 U - SQLite database to the MySQL database, we start with a clean and empty MySQL
6 M3 L% D7 K, l# M3 N' J3 N& C; a" J - database.
( R, w/ e: S+ n - Some users have reported ways to import a SQLite database into MySQL, but at
4 ]( P1 n' c4 ? - the time of writing, there are still too many issues - check the current status
& ~: @- u! P& ? - in the TeamSpeak forums if you are interested.( C+ M; r- L) l% E
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from4 y' o/ s) V! \
- Borland was used. This driver can only interface with the client library that ! d" ~2 Q( m+ S! ?' n
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
7 O# t" V% J6 n! I" A) e6 z; t8 u) s - client library - basically all you have to do is to use a 3.x client library as . {. L/ {0 a: N- H/ s/ a
- "VendorLib" and a 4.x database to connect to. P8 _% L5 M( S- o2 r' h; Z: e) e
- If you need more info about dbExpress, you can contact Borland.5 X& l: q) f* ^! M v9 }
- 9 \2 U4 G) x8 a: e
- ### Doing the work ###/ y0 F0 b3 W2 @% J1 u. @/ W
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- H* t- y& h9 n' p6 L* |- f
- the perquisites right, just open your server.ini file, and add this section at ~/ h0 h- _' j' N$ ~0 e D" }
- the end:9 y1 y! J$ Y( r
- ---cut here---" i6 F4 K0 D5 ~$ b7 s$ [
- [DBEXPRESS]
$ T! C& w1 F. M0 ~- O# V - sqldir=mysql_sql
N1 F6 r% K7 W3 s1 n* B - Drivername=mysql
: U% f7 U9 _% R2 m- ^! W# T - Database=Your_Database_Name_Here
% Z3 [% R3 k0 Z9 q9 G8 [6 o - Hostname=The_PC_the_MySQL-Server_is_on: `, Q% Q, z9 g6 p5 i8 p" i
- User_name=User_name_on_the_MySQL-Server) E- [ s! m, e4 @! p
- Password=Password_to_go_with_above_user_name
! v+ e4 u' p# [4 l - GetDriverFunc=getSQLDriverMYSQL
- L$ f }0 b3 J - VendorLib=path_pointing_at_your_mysql_vendor_lib
" G: ?1 h* X% A* D - LibraryName=path_to_libsqlmy_libary s5 U4 A) h6 c8 y
- Active=1
' e; e0 }4 U E! Y' y4 W: [ - ---cut here---" R+ p. @7 D7 s/ i g
- In my environment (a linux box with a MySQL server running locally) I have:8 E; ~7 T8 K, H3 d& U* D
- ---example---
/ K! o+ A- h( v) ^ Q - [DBEXPRESS]" D3 q, u% a$ v5 D- R6 k
- sqldir=mysql_sql" M2 h" G$ U% s, q" Y' q
- Drivername=mysql
% @( J, A2 C3 X1 T4 J( Z - Database=test
8 l4 i* r5 Z* B% U! q' d! g - Hostname=localhost, B! b" h; T- v" u
- User_name=testuser+ G, E+ G' z6 `. {6 `
- Password=my_password
7 O; k! U0 y# T' _ - GetDriverFunc=getSQLDriverMYSQL0 n2 [5 v6 V. n& u
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.05 D3 W, Q; L, N* Y! r+ @5 E9 D
- LibraryName=./libsqlmy.so
9 y/ C, z% X. A% ] - Active=1
; T* H; T( q- B0 H* @0 F% j - ---example---% |9 f/ A& d( v
- ( C1 C {" o( h* t7 f
- On a windows box, also running the MySQL server locally, it would be:7 m9 k+ p1 L S ^9 \
- ---example---
% P2 e, C$ V7 v, Z% L - [DBEXPRESS]) A, J! _9 |5 E( N2 u% t
- sqldir=mysql_sql& Q5 `; L% O5 |/ N/ P
- Drivername=mysql$ ], o4 _8 A0 k
- Database=test
% w0 ~9 s1 t" d! k0 |' j - Hostname=127.0.0.1- H- V, K0 t8 P( Y* n/ J2 U% y6 B* p
- User_name=testuser+ f* d7 d( N9 o5 K$ n
- Password=my_password, A4 J: p6 W) x, v3 @$ r0 d( V% ^
- GetDriverFunc=getSQLDriverMYSQL
5 [* `( [5 J* F2 I/ A% f - VendorLib=libmysql.dll
6 ^, l) P# [0 j0 O& X! ^2 E - LibraryName=dbexpmysql.dll
$ B J3 g8 a& Q - Active=1
; |1 u4 j" l2 `! w3 b2 A8 x - ---example----9 z; R4 d! v& f
- - written 02.03.04 by pwk.linuxfan7 ^* a# F' d& Q( Q0 B
- $ L% B7 V8 ? {5 h4 Y
复制代码 |
|