|
|
麻烦翻译一下,下面这段文章:xhan
|- P3 y, a$ \8 I8 n
8 C" g8 i$ m' N8 G-
2 B G5 Z+ E% [+ F5 P. {/ G - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
! {, A: R5 T- D, G8 y; s$ D: \ - 4 h- C& E2 m$ A: A/ I1 a: f; p
- ### What we need ###0 k V9 ?; T2 |+ x, W0 P. J
- Naturally, we will need a MySQL server to store the data for us, this document $ G* n0 x* H& [' }+ V4 I
- will not explain how this can be done - there are documents out there for the & \" e" l/ A6 U7 B' L
- interested. The requirements include a (empty) database for TeamSpeak to use/ y1 J, q O4 y" J; V3 o3 c8 x0 Z
- and a user account (username + password) that has the permissions to do stuff- \. j! V- o1 \- e* p
- with the database. Additionally, you will need a vendor library installed on the
. h+ S8 M l2 U1 w - local machine, this came with my MySQL install.
4 Y7 n* ]- |9 E( [. M! s+ X5 \ - These instructions will not tell you how you might transfer your data from the1 O1 U c+ E' {+ q6 [ a
- SQLite database to the MySQL database, we start with a clean and empty MySQL% ?2 g! }5 {1 A4 U0 F5 N; C, c4 |! J* t
- database.- p: c& L* a% h5 ^( _
- Some users have reported ways to import a SQLite database into MySQL, but at g9 m3 E5 E! O. e
- the time of writing, there are still too many issues - check the current status
9 a8 g- L/ M. p - in the TeamSpeak forums if you are interested.
5 G/ S6 y9 O0 | - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from+ `) d: b7 j2 H, ~. Q; F" L3 t0 ]9 k
- Borland was used. This driver can only interface with the client library that
! n! p) x8 ?; k& q1 d- { - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
& O; g, C: K! Y _5 {8 R6 W' L& _ - client library - basically all you have to do is to use a 3.x client library as
! [. J0 ^0 C C8 O/ `8 M' b - "VendorLib" and a 4.x database to connect to.$ O" P* x. T2 D- q5 A
- If you need more info about dbExpress, you can contact Borland.
- i1 `1 }, V$ m! [9 R% s2 b- W+ P - $ n) e' v5 K8 ]. X( ?2 f' s% {
- ### Doing the work ###
1 |8 x& C: k1 M4 ` - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
" u. M/ C/ c* F9 J - the perquisites right, just open your server.ini file, and add this section at
m! ?& E" P( u - the end:) J. n9 ^3 |3 _/ o
- ---cut here---) i( y' Z' p7 w1 U# j
- [DBEXPRESS]( K: J; l3 p9 T: T) O. G$ z* F) Z
- sqldir=mysql_sql. ]6 F' b1 a8 L9 z, d
- Drivername=mysql
8 B& m7 `% b6 ?5 \) @ - Database=Your_Database_Name_Here# o+ T) o& y# v+ O1 w/ ?: Z
- Hostname=The_PC_the_MySQL-Server_is_on
5 Q+ R& U ~; k) }9 T" _. [$ x - User_name=User_name_on_the_MySQL-Server
0 D' U) G+ N! q; p" J - Password=Password_to_go_with_above_user_name: q: {1 s9 d5 V9 b0 }" l
- GetDriverFunc=getSQLDriverMYSQL/ q8 B8 f6 i- H. _6 j) i( [2 M+ S. [
- VendorLib=path_pointing_at_your_mysql_vendor_lib
2 |3 S5 {. N/ V/ X, u" E - LibraryName=path_to_libsqlmy_libary
) T7 w6 y" u: t$ V$ X - Active=13 ^8 o- |2 [ v" t9 w
- ---cut here---
/ }3 G$ S% d" J6 m9 g H- D - In my environment (a linux box with a MySQL server running locally) I have:4 Q0 C: [5 h6 q. L/ ]
- ---example---
: J) S8 P1 h/ w# U/ g. P1 v/ [ - [DBEXPRESS]. o( g. Q: Z X* v) X) i
- sqldir=mysql_sql
6 V- p- P, |& | ~3 Q } D - Drivername=mysql
- a1 I8 p3 D% P+ u3 e* C- A - Database=test
, Q u% N8 h+ T7 e - Hostname=localhost3 \/ \9 x* O: F$ X: u% T
- User_name=testuser
( |4 ]8 c7 k, n1 ~ - Password=my_password( T% I1 g& D5 ^, N8 \( U- |
- GetDriverFunc=getSQLDriverMYSQL# V4 L. m0 o* \+ d+ S$ M( F
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
0 y9 f6 B" H( @! m - LibraryName=./libsqlmy.so' G) P" X* a3 o
- Active=1. I, q5 x& u3 e3 k) L" M
- ---example---; ?4 j8 V6 R, X( I4 P
- 0 c. O% d8 s8 {1 `
- On a windows box, also running the MySQL server locally, it would be:3 E& a0 F( x! N3 e6 D" z# T
- ---example---
: N o) @" }7 s6 N- U - [DBEXPRESS]' y, a" j2 }+ C
- sqldir=mysql_sql
' w8 _0 r: Z, l8 p - Drivername=mysql/ w: |! E0 [$ ~9 C1 \7 Y
- Database=test
$ a) {+ ]0 H: h! U5 ^$ d7 \ - Hostname=127.0.0.1
4 d2 Z9 Q; g" o8 U5 D$ s6 |/ j - User_name=testuser
$ H2 y8 | M! |) M - Password=my_password
M) C1 s4 Q. h8 w - GetDriverFunc=getSQLDriverMYSQL: s# a, ^. I- j$ n/ Y' p
- VendorLib=libmysql.dll
) V# ~- p& N7 q: N/ u& K2 t - LibraryName=dbexpmysql.dll
. `! L0 d5 R1 B2 l - Active=1
) n5 Y% R$ u+ l/ S6 t& g, t - ---example----
9 a" ^# U2 V4 G# C% t( S- f - - written 02.03.04 by pwk.linuxfan
" N( F# X; A+ F4 p0 }, V: N- f - ' u1 r, Z7 x- r) w1 |
复制代码 |
|