|
|
麻烦翻译一下,下面这段文章:xhan ( {1 L. j( w( _% n7 P" E
5 E7 |/ i# i5 @! g6 r% v$ d' {- 1 Z' U( b: I9 L+ i3 p) P3 S7 [; M
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
0 M* U/ @: c& ]7 k1 a - $ Z9 W6 l9 d; o$ \* `' R! g. l, N
- ### What we need ###
- O5 ^$ Y5 X9 c) O7 X3 m - Naturally, we will need a MySQL server to store the data for us, this document
$ L) C5 u9 C2 p - will not explain how this can be done - there are documents out there for the / c+ E. g: w8 Z* b, f! O
- interested. The requirements include a (empty) database for TeamSpeak to use4 ~! k( ]" R* t1 Q( g0 e" B' ~, `) Y
- and a user account (username + password) that has the permissions to do stuff! F6 R6 K5 f! _+ \; ], C! f' Y
- with the database. Additionally, you will need a vendor library installed on the% O8 T" o) S$ _7 `; w! r
- local machine, this came with my MySQL install.
, S. @0 g: d3 W7 f% V7 C; O - These instructions will not tell you how you might transfer your data from the
5 i# O* M. f9 H) P- U3 | - SQLite database to the MySQL database, we start with a clean and empty MySQL# @5 E3 C1 {5 ]4 y6 i
- database.$ D1 f' ?2 A+ x% A
- Some users have reported ways to import a SQLite database into MySQL, but at+ i4 B; E% s- t$ o! ]) x4 V4 `
- the time of writing, there are still too many issues - check the current status
7 r1 B/ z$ B* J" z* W4 ] - in the TeamSpeak forums if you are interested.
$ A6 Z0 k8 N7 y5 t7 u( e - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from+ i. c7 `6 ~+ s w) i
- Borland was used. This driver can only interface with the client library that
* h, ]7 T! U8 T; @# b - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
" E4 r1 n, H3 j1 T - client library - basically all you have to do is to use a 3.x client library as . R1 q% U( Q" @2 U3 m7 ^0 c6 a
- "VendorLib" and a 4.x database to connect to.5 M# _- y0 E; k N
- If you need more info about dbExpress, you can contact Borland.- ~1 i H% c; [ X: |) C
- 2 ^4 | o# N4 I- V) I
- ### Doing the work ###
/ q0 Y) j% C, R: N6 x3 A# U9 N - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
$ S" l* _5 i `) `- g O - the perquisites right, just open your server.ini file, and add this section at* e2 f) ~4 {$ o3 c- I
- the end:0 l- U6 q2 Q7 y4 c
- ---cut here---
" Y& d; K4 ~6 A* M2 V* Z5 |) g - [DBEXPRESS]
4 I ~+ g6 M) T Y - sqldir=mysql_sql( Y" R0 N1 s2 q- l( N
- Drivername=mysql
0 J, B1 O& H7 ~* ~. W$ ], Q. U - Database=Your_Database_Name_Here
9 |* ^7 N+ P8 R" t9 I1 s - Hostname=The_PC_the_MySQL-Server_is_on
9 s4 @* _& s% L* |3 X# U - User_name=User_name_on_the_MySQL-Server2 H8 D7 Z" H' q% s) y4 j
- Password=Password_to_go_with_above_user_name1 X* ]+ Q' v% v- G7 O) I
- GetDriverFunc=getSQLDriverMYSQL
F; ~: A( I, v3 Z5 E) H - VendorLib=path_pointing_at_your_mysql_vendor_lib
# O0 O6 h* }! ^2 O# w+ Q [ - LibraryName=path_to_libsqlmy_libary. Y8 F7 O/ S. t* c/ Y# L: Q/ c
- Active=1
0 i" e- \+ C0 _ - ---cut here---
1 N$ |# A4 X( U - In my environment (a linux box with a MySQL server running locally) I have:
$ x; M" h( _9 |) ]5 V' [ - ---example---7 ?- N# p5 Y# \8 [+ J
- [DBEXPRESS]
. j) H/ \5 y Q" S - sqldir=mysql_sql
0 |- z. |1 n- _9 u% {/ l - Drivername=mysql
8 k) m' f( a' x Y$ Y# k& w - Database=test. P4 ~+ v/ q( X( \# p6 D
- Hostname=localhost! d$ C1 w7 {( y. C% K- E! K
- User_name=testuser. U: ?* H1 y) V m6 J& u
- Password=my_password
: P4 g7 o1 ~, Y5 f - GetDriverFunc=getSQLDriverMYSQL5 \, t+ g2 J8 x- B1 Z
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. @, E0 _: ^8 G0 w# z* M W
- LibraryName=./libsqlmy.so; q: @" u$ L2 x- K) R/ i9 g; _/ x! U" a
- Active=1
" f- K9 U" ^+ d R - ---example---
: z; L [% j/ ]& f% t2 c! R
4 h' J' N- I. L- On a windows box, also running the MySQL server locally, it would be:
3 k" G9 q9 U6 T4 M& G( P) {, v# v - ---example---. l1 k4 F; j7 m
- [DBEXPRESS]+ _( a4 P( G6 O5 n( I
- sqldir=mysql_sql
: U4 N% {5 Z+ e& i0 k - Drivername=mysql0 J8 C6 I7 m+ E" s: B
- Database=test- [, [# p4 S. N6 W+ [
- Hostname=127.0.0.1* ^; S% Z+ u3 s% W/ l8 s* ]4 a
- User_name=testuser6 ]+ x* `$ t2 m9 g2 o
- Password=my_password+ N/ G$ k, G" ?; a6 G- H
- GetDriverFunc=getSQLDriverMYSQL
, v r6 F0 T$ Z+ U; u2 t - VendorLib=libmysql.dll
1 L7 d! H: C$ o- F( y - LibraryName=dbexpmysql.dll
* R. T9 Y; P+ n! N, n7 L - Active=12 O3 R7 E1 L2 j, z/ O, d
- ---example----/ t+ q* O* E" ]1 u! O& y7 h" v
- - written 02.03.04 by pwk.linuxfan F3 @- y" ^, H' {. p1 V
2 n; t3 q1 d8 H3 D: H
复制代码 |
|