|
|
麻烦翻译一下,下面这段文章:xhan
1 j; f7 u1 F! [! n; @% z$ N& c, H% D+ k2 Y2 L- t' Q! _
- - `5 `7 G2 H1 G" c H5 t/ Q: J
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 k! D, a6 s, l+ k' ]
1 e: z& u+ M* e, c3 ^- ### What we need ###4 b. g6 ^9 c% I6 P7 g
- Naturally, we will need a MySQL server to store the data for us, this document . m( o7 E4 S3 {# U3 a0 F I5 w
- will not explain how this can be done - there are documents out there for the & ^- ~$ x, u3 K& O( D2 ^" v
- interested. The requirements include a (empty) database for TeamSpeak to use7 N! N. Z; b6 v
- and a user account (username + password) that has the permissions to do stuff
7 `( C3 y/ W; x - with the database. Additionally, you will need a vendor library installed on the% Y6 B/ V" y6 q$ K$ s
- local machine, this came with my MySQL install.
. `% a1 G9 j3 T( Y - These instructions will not tell you how you might transfer your data from the1 k7 R, ~4 F9 b" f
- SQLite database to the MySQL database, we start with a clean and empty MySQL
: m0 z- b6 `5 x4 }( u - database.! Q2 l- v( h2 i* s9 O; A
- Some users have reported ways to import a SQLite database into MySQL, but at0 A' l8 `, Q; Z. f8 w& I: C8 n& n
- the time of writing, there are still too many issues - check the current status1 d; M: x4 b& B/ i
- in the TeamSpeak forums if you are interested.2 E8 [* }! c- @8 R e+ v% u/ x
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; o/ b# @$ T; V; v+ o
- Borland was used. This driver can only interface with the client library that ) D7 \' Z+ ]" V9 _
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 L# g2 D" \6 R2 ]# U# A
- client library - basically all you have to do is to use a 3.x client library as ' X* C" l3 J. t! P& S; M& ]; k
- "VendorLib" and a 4.x database to connect to.! Y3 ~8 V! o1 t
- If you need more info about dbExpress, you can contact Borland.$ C$ J$ X5 h) t r* O; P& z
: `# i4 x+ H3 T- ### Doing the work #### X9 M' ]- O% _) v4 {
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all2 R' |! _3 u- U# y4 K
- the perquisites right, just open your server.ini file, and add this section at
* F# S9 v4 J. ^! R - the end:8 G; F; \5 T; ^) \
- ---cut here---1 G; S% r9 _; o5 w1 G% I. y8 Z
- [DBEXPRESS]
4 a8 |8 t/ Z2 A- I - sqldir=mysql_sql
% l. U& U3 o0 E; t - Drivername=mysql7 {1 q/ z5 V- q8 D
- Database=Your_Database_Name_Here
" m9 `3 H4 j3 l# B - Hostname=The_PC_the_MySQL-Server_is_on
' y6 V% v9 B3 m( U - User_name=User_name_on_the_MySQL-Server
1 F5 M2 j! l# y9 M9 h$ ^ - Password=Password_to_go_with_above_user_name: h1 `% Y B* B- [1 E* N! z; }
- GetDriverFunc=getSQLDriverMYSQL! ? |2 L* D$ V' V0 K
- VendorLib=path_pointing_at_your_mysql_vendor_lib
0 _0 `! O8 l5 L8 S - LibraryName=path_to_libsqlmy_libary# r$ a* z' _$ A% }
- Active=1
4 i* s7 ~- m/ z - ---cut here---
8 C, t& X* W6 l- R) Q1 c5 p5 E - In my environment (a linux box with a MySQL server running locally) I have:' F3 I8 g! ]7 V: ^5 q7 c
- ---example---
9 X J9 g2 _( @1 D( H - [DBEXPRESS]
1 o& w; A7 v: U, s* x$ m9 T - sqldir=mysql_sql2 ~0 Y/ [: s1 I1 N) H3 j* {
- Drivername=mysql
% a. m! h' Z! S8 W3 k - Database=test
) C& i- J+ |) L/ E* V# k - Hostname=localhost& [" M1 N: L( G$ W
- User_name=testuser) u8 i ~4 v8 @; h4 `8 `
- Password=my_password% [% r; Z3 X, H% M
- GetDriverFunc=getSQLDriverMYSQL2 b f) T! a* ]# m W6 k; H
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
. Z6 O4 t! F) M4 B - LibraryName=./libsqlmy.so
" f" {0 _- s+ \: ^9 Q- b - Active=1
- b4 w6 ^1 i/ P/ \5 E8 j - ---example--- r1 D3 j5 J J, A& u# N- O
+ [! ]3 w- t3 G8 ]4 t3 I- On a windows box, also running the MySQL server locally, it would be:; h/ c( ^3 X# G$ e6 |
- ---example---, l; t8 t$ s R8 i9 m
- [DBEXPRESS]7 \$ F0 C: H1 C, S
- sqldir=mysql_sql* Y+ g/ n, z: x. x: j
- Drivername=mysql) @7 r' ` s/ [
- Database=test! p1 o: C& i d, P
- Hostname=127.0.0.11 k; m, [# ~7 F
- User_name=testuser" W- p: a/ {( d4 p2 E
- Password=my_password7 v0 y; Z9 k/ J" w- ?5 V- v* x
- GetDriverFunc=getSQLDriverMYSQL ^# J9 A6 E( L0 y- A
- VendorLib=libmysql.dll
0 j- f4 \6 q$ j( d3 u - LibraryName=dbexpmysql.dll
" _7 B7 v/ o5 \4 x. V/ j6 c - Active=1
* q0 ]0 ^0 f' x2 e. W - ---example----2 o, H- s# W. H. S: j
- - written 02.03.04 by pwk.linuxfan/ t4 p1 }: B' \6 F z0 [) s
2 _( l8 ~, c u5 b* ], H
复制代码 |
|