|
|
麻烦翻译一下,下面这段文章:xhan 4 Q. h) D @7 W; [
5 G1 @2 @ r. y: Q. \2 V- 6 \8 P) k9 T( K3 j7 n, p, e" X
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
- D D( J) p; i9 h
5 _6 f8 c. U9 m! b6 z- ### What we need ###
; K H8 r; z) {/ N- W5 w% }7 R - Naturally, we will need a MySQL server to store the data for us, this document 2 b( j" r. I5 O: u L. c4 }# {
- will not explain how this can be done - there are documents out there for the ' H9 n/ [/ S7 g
- interested. The requirements include a (empty) database for TeamSpeak to use
0 L% d0 S+ b2 e) ?* s9 j/ p" H - and a user account (username + password) that has the permissions to do stuff
6 k, D% U7 v# K1 H% `! w - with the database. Additionally, you will need a vendor library installed on the
+ f1 @4 V9 s6 T$ z; A - local machine, this came with my MySQL install.
9 O- W/ l, J- T9 E# t - These instructions will not tell you how you might transfer your data from the
! l! m9 p" G% A6 M- O) t Q - SQLite database to the MySQL database, we start with a clean and empty MySQL
/ q# W0 {3 r2 C6 `5 I - database.
/ W8 Q9 R$ _7 h, j" N' [+ M - Some users have reported ways to import a SQLite database into MySQL, but at* K5 }5 Y; S9 q6 ?
- the time of writing, there are still too many issues - check the current status
, ~0 |6 z2 @ U5 W: A7 h9 [ - in the TeamSpeak forums if you are interested.
: b, Q8 q4 k' H9 D/ J - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from& u; L: ~5 C2 I3 q% A
- Borland was used. This driver can only interface with the client library that
1 D9 E" {5 O% \6 D" }6 w% C- ` - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this$ p+ B) C1 c+ E: @
- client library - basically all you have to do is to use a 3.x client library as 3 \8 t# {2 t! _: r) Q# S/ Q
- "VendorLib" and a 4.x database to connect to.8 @6 d6 d2 n+ u' R0 I1 J9 w
- If you need more info about dbExpress, you can contact Borland.
$ x$ m8 b2 [. k" t9 e" n2 g
/ B7 v% ?$ D! J. c# g5 g- ### Doing the work ###
) g1 Z. O: [- ] - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# d# w' W2 t' `! D - the perquisites right, just open your server.ini file, and add this section at
% k, y( |1 T# w: v4 ` - the end:' _9 l0 }" m$ V, d% c! @7 d
- ---cut here---( w2 Z: r0 i% L2 h$ i I0 B
- [DBEXPRESS]
- h- X% R+ @( b: R' a2 P - sqldir=mysql_sql
& R! @* o0 R1 o' N% q - Drivername=mysql# O3 P8 Q G" i1 @9 A9 {, i# X
- Database=Your_Database_Name_Here/ B ]1 X [5 @/ e% d
- Hostname=The_PC_the_MySQL-Server_is_on
$ ^! X3 C( m- D9 W7 f - User_name=User_name_on_the_MySQL-Server
, B2 W1 k" K6 l# k( J - Password=Password_to_go_with_above_user_name
9 N/ e: [. v2 b/ T% [3 M$ g. g5 r! k - GetDriverFunc=getSQLDriverMYSQL
% r1 E m5 Y9 n0 h# B - VendorLib=path_pointing_at_your_mysql_vendor_lib
" `$ d+ S, i8 u/ E1 ^$ r& F - LibraryName=path_to_libsqlmy_libary' g V8 v. {; _
- Active=1
' Q; @0 h4 t6 o! { - ---cut here---* P, |/ A" _% {% t
- In my environment (a linux box with a MySQL server running locally) I have:
9 a `; E' T# Q* d! O1 Z - ---example---
. D6 n9 T5 m& _( R5 \# }. ? - [DBEXPRESS]3 g$ N& C. n& B, I7 [5 P, }
- sqldir=mysql_sql# G1 Q, P# O; {" D' o% E% \; s
- Drivername=mysql
5 o8 O% ]1 I* I" X, Y - Database=test$ g2 D8 o0 T& M5 j/ D
- Hostname=localhost9 Y# M6 b9 Z, X g* c% u
- User_name=testuser! ^) O( h+ A1 B
- Password=my_password' D- C* O9 F% V
- GetDriverFunc=getSQLDriverMYSQL
% s7 c u& q2 l& {- M W - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0% v; D( l6 J5 g1 N2 h; W& t& y
- LibraryName=./libsqlmy.so
: D# V+ F+ P/ l - Active=18 u' e' g* y, }- {" K$ z" @8 G, G
- ---example---. t$ m4 B& z+ o
2 @5 E+ ?( x2 | R# w) E- On a windows box, also running the MySQL server locally, it would be:6 `# x$ L6 K, ^7 s7 |: f% ?) h; E
- ---example---
# X) t( L0 j6 {. u/ }4 K: e7 s1 P* a - [DBEXPRESS]
) c! v6 l2 y2 _" Z# D' ^ - sqldir=mysql_sql6 m9 b$ b, P- Z) H5 T/ O$ M( b
- Drivername=mysql* Z) }+ P7 z$ B+ k! M! Q0 T* n
- Database=test
" v& y; p3 V+ e8 l. o - Hostname=127.0.0.1
# g9 c/ y* V) y, [0 @$ Z; {, K; K - User_name=testuser
% H1 M3 b9 s' t& f" G, u - Password=my_password
, E1 K z1 s' O7 `5 G7 O5 f - GetDriverFunc=getSQLDriverMYSQL- ?' O0 T1 G9 z6 X1 @. x: d4 ~5 j \
- VendorLib=libmysql.dll) K P7 Z2 d5 H, ?! U
- LibraryName=dbexpmysql.dll' f2 l* ~. f' H1 B; T$ b+ h
- Active=1. V3 [, K' `' V) e0 N
- ---example----( f. q1 V4 J* ^5 q! z/ f- [
- - written 02.03.04 by pwk.linuxfan
7 ~& k- c* n/ l8 U" N - ! \; s; U/ p7 J- Z% ~' Y
复制代码 |
|