|
|
麻烦翻译一下,下面这段文章:xhan & z7 B' g# @5 Z0 F4 h9 ~
8 m6 a7 F& n$ a8 s `+ X
-
& s; x( @; r v7 W1 `1 u: U - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
; W5 H1 o; @# [: r" _" e6 [
* C( I8 j4 ?2 ^% ]1 i" g- ### What we need ### M' a# F" W' k0 `/ H0 {4 L4 F
- Naturally, we will need a MySQL server to store the data for us, this document
g% j. a {& M - will not explain how this can be done - there are documents out there for the
9 X0 ~0 G9 q4 m3 H& k ~ - interested. The requirements include a (empty) database for TeamSpeak to use
- ~- k& i; m# D8 q$ n6 z; ` - and a user account (username + password) that has the permissions to do stuff
: v8 `- w# u# w" B/ C; ^ M+ X% e - with the database. Additionally, you will need a vendor library installed on the1 `/ n2 f# r3 h/ ^4 D1 i" Y
- local machine, this came with my MySQL install.
) l/ Y& p) w- F) j$ L* m5 D( ^ - These instructions will not tell you how you might transfer your data from the
9 s& ]" J# D. O$ A+ }& } - SQLite database to the MySQL database, we start with a clean and empty MySQL @: J& c% o- E3 a
- database.
' v& X! m( S1 `( D) }. [2 x - Some users have reported ways to import a SQLite database into MySQL, but at
' I+ f, Y- q: q# B% m& R - the time of writing, there are still too many issues - check the current status
9 e. T/ f0 X/ c% r- W2 q4 L - in the TeamSpeak forums if you are interested.2 U2 ] {1 u6 O9 C/ A
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from, n0 f4 q" g. N
- Borland was used. This driver can only interface with the client library that
. n3 g8 p5 L* L - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
: i: O( Z" `7 }) J1 e- R3 }8 X5 h - client library - basically all you have to do is to use a 3.x client library as
* o; o4 ^ x. M/ S& h - "VendorLib" and a 4.x database to connect to.
5 s. q3 \5 {( m - If you need more info about dbExpress, you can contact Borland.
1 b. A* K I2 b0 N i% h - + [% z8 e$ w/ @( }. W
- ### Doing the work ###$ Q# k: f# o( v$ }% t) p
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
3 B, F Y6 `3 e' H* w - the perquisites right, just open your server.ini file, and add this section at
* T* X; _, k, b. m9 V" A! n/ ` - the end:
+ y$ o$ m: b1 y - ---cut here---
L# ?1 |* A6 R' O6 a - [DBEXPRESS]
; B% F6 m& W# Y" A4 C) n. Q1 Q - sqldir=mysql_sql
7 Q( ]- J! d0 q" |, L& P - Drivername=mysql
3 ]* K4 o$ Z/ }" z - Database=Your_Database_Name_Here% G$ B3 _7 Y* V6 L( g$ a; [
- Hostname=The_PC_the_MySQL-Server_is_on
/ |; y$ J( K% l8 B - User_name=User_name_on_the_MySQL-Server) u4 F0 P2 D0 B e Z) |: [# @! q7 ]
- Password=Password_to_go_with_above_user_name( M$ v- B; h9 |" u9 n
- GetDriverFunc=getSQLDriverMYSQL. o8 u' k" W1 Y& }
- VendorLib=path_pointing_at_your_mysql_vendor_lib
1 n3 h, [7 ]4 o - LibraryName=path_to_libsqlmy_libary: T0 q# l& j$ f6 R5 G; z. Q4 `/ f
- Active=1
4 f0 b# R& Q" \9 U+ o0 Z( k - ---cut here---( |6 @1 l& B$ U2 o; o
- In my environment (a linux box with a MySQL server running locally) I have:
9 |& p3 Z) Q& N - ---example---% r( R$ _8 R# z- H6 ?
- [DBEXPRESS]; W. m& J; h' D# A4 J2 q
- sqldir=mysql_sql2 g, e+ n/ I& S0 |8 O" S
- Drivername=mysql4 e% \2 @- u5 M7 a, K
- Database=test& P. O' h: q/ h$ Q& {
- Hostname=localhost2 T5 H& F* {/ i* Z {' F! G& h
- User_name=testuser# t3 ?; [! V, Z( p) p
- Password=my_password
* d& I% f9 m [+ t t# W - GetDriverFunc=getSQLDriverMYSQL: n1 ]) \1 G8 s
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.03 J' x# k% { q& E0 P
- LibraryName=./libsqlmy.so" p! b$ W# X; ~: F7 _# X1 d
- Active=1
# z, p5 C" [; U7 Y - ---example---
2 I* Y G$ i. E% f- C7 j0 O
5 {, V3 G. Q0 \" E- On a windows box, also running the MySQL server locally, it would be:
" H+ {2 K# ^8 S8 f# e, e7 k: X - ---example---# x* V# k+ U, S7 ^+ l" P
- [DBEXPRESS]. I" K8 B+ e/ C" Z# s
- sqldir=mysql_sql
5 f0 z+ d6 k+ r - Drivername=mysql
3 B) h% e% ]) g4 E- f, w - Database=test6 S! U" Y2 @+ |: l" V; Z: ]( H
- Hostname=127.0.0.1
0 f7 R1 T' D4 D# Q ] - User_name=testuser
9 b8 A- P3 M" _4 \& W5 F. y9 Y - Password=my_password W2 s+ l! X8 A, V5 u' [ [
- GetDriverFunc=getSQLDriverMYSQL' ^: t8 P; b& N% r/ B
- VendorLib=libmysql.dll
$ U' A% I% u( g$ U! V9 I - LibraryName=dbexpmysql.dll+ T$ d* P- A8 h) H' |8 H. g. H$ [4 d/ r
- Active=1
+ ]& W! p" S9 ?1 j @ - ---example----& I% w- S( d4 C x5 R+ ]4 u
- - written 02.03.04 by pwk.linuxfan4 J0 R- H9 v. R) u0 h' S( {
- " B* K6 F) P* y
复制代码 |
|