|
|
麻烦翻译一下,下面这段文章:xhan
' z) |. Y; R6 {: w/ l7 [* D- b: w r. J, ?% I+ }9 A/ H
- - B& T: q4 ^% n& V
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 N7 y/ K& ^/ y/ ^2 b/ h3 N
- h& @% P: D+ |. W, R: H- ### What we need ### B+ d5 C! { Z# ?% U B3 _
- Naturally, we will need a MySQL server to store the data for us, this document 0 z+ j- S* d; ]
- will not explain how this can be done - there are documents out there for the
! Y$ \) F9 I U4 |0 w - interested. The requirements include a (empty) database for TeamSpeak to use
2 c) B; Q3 w% r* a1 R# n - and a user account (username + password) that has the permissions to do stuff) ~: h% a3 _' B9 K
- with the database. Additionally, you will need a vendor library installed on the
* F6 f3 l) I% e - local machine, this came with my MySQL install.( P6 }" M; b- P: G+ s: C
- These instructions will not tell you how you might transfer your data from the. t: w e! S0 |' l e# V4 c' N2 U
- SQLite database to the MySQL database, we start with a clean and empty MySQL: U7 y+ K% W- p8 q% w, F" b
- database.
- I# T% ?1 \ z5 k$ C. W - Some users have reported ways to import a SQLite database into MySQL, but at+ r9 G- B0 y6 y4 u. b& v/ O
- the time of writing, there are still too many issues - check the current status
4 L$ R- K9 n+ D, _7 s$ o3 I - in the TeamSpeak forums if you are interested.
2 ~0 u9 |6 A0 s, t8 b. A - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
$ ? Z: z+ ^* D0 h9 Q. J - Borland was used. This driver can only interface with the client library that 5 I, s6 ? N$ e g# m" C
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; ^7 i( ]* s& H G" l! w- Q& G
- client library - basically all you have to do is to use a 3.x client library as ; c& P1 r5 J! f3 K: u: R
- "VendorLib" and a 4.x database to connect to.1 }& E: C$ v1 ~1 H9 @
- If you need more info about dbExpress, you can contact Borland., P# n$ D1 J$ y) c: N. _9 Q
0 x9 v3 I3 s7 l9 `- ### Doing the work ###7 r% ?6 m- g% e
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- s* F# h# a6 @
- the perquisites right, just open your server.ini file, and add this section at
0 t) s' e% v9 w" g$ ~! O - the end:
& D0 e) ?9 b- O! \ - ---cut here---3 B' v7 B% ?3 M& f: { q1 T
- [DBEXPRESS]
0 p& R4 ?+ g+ b - sqldir=mysql_sql; G+ s1 e" N8 z" u9 h0 u! F, _
- Drivername=mysql' q+ C5 K/ F, A/ p- p/ Q& Q, l6 v
- Database=Your_Database_Name_Here0 }9 c( D6 e* x; T) [
- Hostname=The_PC_the_MySQL-Server_is_on
+ X o4 c( k% f3 S4 i - User_name=User_name_on_the_MySQL-Server% M& X1 i( f& J- _& W4 r7 J
- Password=Password_to_go_with_above_user_name, {3 d6 U: F/ X3 l
- GetDriverFunc=getSQLDriverMYSQL
5 H+ q$ `4 ]2 M- o# [ - VendorLib=path_pointing_at_your_mysql_vendor_lib# A! S3 d$ j5 U t- D! l) {7 _
- LibraryName=path_to_libsqlmy_libary7 \3 X' b) a2 Q# a
- Active=1
b; O4 L r8 R" ]1 o4 u' B - ---cut here---/ k& n$ @6 k0 O0 N! M
- In my environment (a linux box with a MySQL server running locally) I have:
/ W: b+ B( r1 |4 M) U% k; w - ---example---1 n, k4 D. w e" t4 |/ ]
- [DBEXPRESS]; C$ U" C4 y9 j
- sqldir=mysql_sql
3 t! @ V9 e& l- A+ _* j r - Drivername=mysql
, y! \* O2 p. @" \* Q M( v - Database=test$ i: a9 z$ k% Q" |. K! K) U
- Hostname=localhost
! T4 {6 r( ^4 O Q" J9 c$ `- O7 _ - User_name=testuser
5 \$ D6 o# j7 p! n6 u" N' c - Password=my_password8 q; Z* f+ n) m: Y4 ]$ V, l
- GetDriverFunc=getSQLDriverMYSQL% M/ E+ ~% P/ J+ ^# S3 B
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0/ w$ `; L( E% q5 q; o+ ~; @
- LibraryName=./libsqlmy.so( R, j9 }7 {% y8 k8 I
- Active=1
$ F Z2 r: `9 G9 \; b0 i. C" o - ---example---0 [6 P, q6 |8 K5 X" B& N3 z, z
& g% X2 E$ o+ _/ T, L/ G" S' l- On a windows box, also running the MySQL server locally, it would be:2 `9 _$ h! C: R, F
- ---example---
7 U, \* h- t9 ?5 a7 X e; d0 f2 C6 X( b - [DBEXPRESS], A1 L- _0 A2 V8 I7 D( N
- sqldir=mysql_sql
( F$ p9 a: r6 P# y0 E; V - Drivername=mysql4 U* J( I& y. m% T: b1 Z) [
- Database=test D" P0 v) W7 p: E1 v$ U# C' u
- Hostname=127.0.0.1* K) F! C O; [; C: {$ k- Y
- User_name=testuser; }9 X" g% a3 t
- Password=my_password5 O4 B* {' k4 B U
- GetDriverFunc=getSQLDriverMYSQL
5 D. H2 _2 A; ^$ P6 {' m7 q, G m4 m - VendorLib=libmysql.dll
: a1 k3 D$ k g: t, n4 A; ? - LibraryName=dbexpmysql.dll
5 Y6 l7 O5 R# K) A' [4 \; e - Active=1! @0 ]: }/ V- `
- ---example----
C& ^# N( Q( v) b6 b - - written 02.03.04 by pwk.linuxfan3 h( G$ i2 \9 N# X# c# ]/ F, z
- % q/ h) T5 N* D) g
复制代码 |
|