Topic: Atn DarkElf/Rajnsaj...A little SQL Dyna help please!  (Read 1338 times)

0 Members and 1 Guest are viewing this topic.

Kel

  • Guest
Atn DarkElf/Rajnsaj...A little SQL Dyna help please!
« on: May 01, 2003, 06:16:20 am »
Guys,

I'm having trouble connecting to MySQL from the dyna server.  I have created the database with no problem on the same machine as the dyna server (WinXP).  I have created the system DSN and tested connectivity with it using StarOffice (a database like MS Access).  When I start the server using flatfile, it starts up fine.  When I start up using SQL, it displays some messages and then the window dissappears.  I have followed the instructions in the server kit to the letter, but i'm obviously missing something.  Any ideas?

Many Thanks.  

GDA-Kel
Gorn Dragon Alliance
« Last Edit: May 01, 2003, 06:17:07 am by Keltset »

Karnak

  • Guest
Re: Atn DarkElf/Rajnsaj...A little SQL Dyna help please!
« Reply #1 on: May 01, 2003, 09:15:21 am »
Quote:

Guys,

I'm having trouble connecting to MySQL from the dyna server.  I have created the database with no problem on the same machine as the dyna server (WinXP).  I have created the system DSN and tested connectivity with it using StarOffice (a database like MS Access).  When I start the server using flatfile, it starts up fine.  When I start up using SQL, it displays some messages and then the window dissappears.  I have followed the instructions in the server kit to the letter, but i'm obviously missing something.  Any ideas?

Many Thanks.  

GDA-Kel
Gorn Dragon Alliance




Goto your ODBC Admin screen under Administrative tools and make sure once again you have the DSN properly setup including the proper DB name, User ID, and password that you've setup using your MySQL admin. app.  Also, ensure your ODBC manager is using the MySQL driver.  Make sure the database you are trying to access has been created. Make sure all the proper tables have been created and updated with starting values.

Test the connection from the ODBC Admin. screen and the MySQL Admin app.  Make sure you enabled DB in the GF files.  That's all I needed to do.

Once you have you ODBC DSN setup properly you can use it to switch between databases at will. I'm already doing this between ISC Inv. and SG3.

For example:
Meta GF file setup using one DSN
[SQL]UseSQL = 1   // (0) 0 = use flat file, 1 = use SQL
DSN = "GFLISC;"   // DSN of database
DumpLog = 0         // 0 = none, 1 = separate files, 2 = one file, 4 = both ways


1) ISC Inv. ODBC setup:
DSN="GFLISC"
DB=ISCINV
UID=root
PWD=******

2) SG3 ODBC setup:
DSN="GFLISC"
DB=SG3
UID=root
PWD=*****

Or if you want switch at the GF file level then you can just create 2 DSNs:

1) ISC Inv. GF file setup
[SQL]UseSQL = 1   // (0) 0 = use flat file, 1 = use SQL
DSN = "GFLISCINV;"   // DSN of database
DumpLog = 0         // 0 = none, 1 = separate files, 2 = one file, 4 = both ways

ISC Inv. ODBC setup:
DSN="GFLISCINV"
DB=ISCINV
UID=root
PWD=******

2) SG3 GF setup:
[SQL]UseSQL = 1   // (0) 0 = use flat file, 1 = use SQL
DSN = "GFLSG3;"   // DSN of database
DumpLog = 0      // 0 = none, 1 = separate files, 2 = one file, 4 = both ways

SG3 ODBC setup:
DSN="GFLSG3"
DB=SG3
UID=root
PWD=*****

 
« Last Edit: December 31, 1969, 06:00:00 pm by Karnak »

Kel

  • Guest
Re: Atn DarkElf/Rajnsaj...A little SQL Dyna help please!
« Reply #2 on: May 01, 2003, 12:16:53 pm »
Rajnsaj, Karnak...thanks for the quick replies.  I have added the dumplog = 1 line to the database.gf file.  I have also retested my DSN connection using ODBC Administrator,  MySQL Command Center, and StarOffice database.  All showed good connections.  

I was able to test the server here at work over a 56k connection.  I definitely got further along in the server startup process, but it still barfed on me.  I think it may be my slow connection though, because the flatfile server also barfed with the same error.  I'll try my cable modem connection tonight after I get home from work.    

Have you guys been connecting to the default chat servers?  I'm thinking that may be part of the problem.

Thanks again for the help guys.  The Gorn Confederation R&D Department owes you one.

GDA-Kel
Gorn Dragon Alliance      

DarkElf

  • Guest
Re: Atn DarkElf/Rajnsaj...A little SQL Dyna help please!
« Reply #3 on: May 01, 2003, 01:12:16 pm »

Start your server from the command prompt, run the ServerPlatform.exe and cut and paste the output.  It would help for me to diagnose the problem.

Also...

- Do not start the ServerPlatform.exe from a shortcut unless your sure it works.
- Try starting the kit with a freshly prepped database and an UNEDITED kit as a test...errors in the .gf files can cause problems like this.
- Ensure DSN names match and your using the MySQL driver.  (Has MyODBC been installed? Or Connector/ODBC?)
- Ensure that your MySQL database was created correctly, and has the correct structure.  Did you use Dyna2EAW2034 to create your structure?

Try these steps:
Edit the Dyna2EAW2034.sql file and update the names of the database to match the name of the MySQL db you want. (Do NOT use Notepad to do this!).  If this is the first time you've created this database remove the line that drops the old one.

Save the edited version of this file in directory C:\MySQL\bin\
Open a commnad prompt box and:

Code:

D:\Servers\SFC2Server2036\SFC2Server\Dyna2Xtras>cd C:\MySQL\bin\

D:\Servers\SFC2Server2036\SFC2Server\Dyna2Xtras>C:

C:\mysql\bin>mysql < Dyna2EAW2034.sql



This will ensure the structure was created correctly.

If all this fails, post again.

Kel

  • Guest
Re: Atn DarkElf/Rajnsaj...A little SQL Dyna help please!
« Reply #4 on: May 02, 2003, 01:26:59 pm »
BINGO!

I added the missing line to my Database.gf file and recreated the database from the command line as DarkElf suggested.  It worked.  

The next step is to point the system DSN to another remote database on a linux box and see how that goes.  After that is adding several additional tables for increased sever functionality.

Thanks for your help guys.  I'll keep you posted.

GDA-Kel
Gorn Dragon Alliance
 

Karnak

  • Guest
Re: Atn DarkElf/Rajnsaj...A little SQL Dyna help please!
« Reply #5 on: May 02, 2003, 02:34:02 pm »
Cool.  I prefer to open up the SQL file from MyCC app and run it there instead of doing the command line:

C:\mysql\bin>mysql < Dyna2EAW2034.sql

It's easier to write and execute SQL script from there. I wrote a few from zapping the database to  simple DB clean ops.  But, whatever works for ya.
« Last Edit: December 31, 1969, 06:00:00 pm by Karnak »