Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MySql
 Snitz can't find database. Why?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

rogersmithiii
Starting Member

16 Posts

Posted - 11 December 2007 :  10:43:30  Show Profile
I'm completely new to MYSQL and Snitz, and am having a problem getting Snitz to find the database. I installed MYSQL, and can use the command prompt screen to execute commands. I can log into MYSQL by means of the username "root" and the password "pass1". I created a database called "test1", and it shows up when I execute the MYSQL command "show databases;".

I edited the Config.asp file in Snitz, as follows.

************************************
'strDBType = "sqlserver"
'strDBType = "access"

strDBType = "mysql"

'## Make sure to uncomment one of the strConnString lines and edit it so that it points to where your database is!
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("snitz_forums_2000.mdb") '## MS Access 2000 using virtual path
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/USERNAME/db/snitz_forums_2000.mdb") '## MS Access 2000 on Brinkster

'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\db\snitz_forums_2000.mdb" '## MS Access 2000

'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("snitz_forums_2000.mdb") '## MS Access 97 using virtual path

'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/USERNAME/db/snitz_forums_2000.mdb") '## MS Access 97 on Brinkster

'strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\inetpub\dbroot\snitz_forums_2000.mdb" '## MS Access 97

'strConnString = "Provider=SQLOLEDB;Data Source=SERVER_NAME;database=DB_NAME;uid=UID;pwd=PWD;" '## MS SQL Server 6.x/7.x/2000 (OLEDB connection)

'strConnString = "driver={SQL Server};server=SERVER_NAME;uid=UID;pwd=PWD;database=DB_NAME" '## MS SQL Server 6.x/7.x/2000 (ODBC connection)

'strConnString = "driver=MySQL;server=192.168.1.112;uid=root;pwd=pass1;database=test1" '## MySQL w/ MyODBC v2.50

strConnString = "driver={MySQL ODBC 3.51 Driver};option=16387;server=192.168.1.112;user=root;password=pass1;DATABASE=test1;" '##MySQL w/ MyODBC v3.51

********************************************

The IP address of the server running MYSQL is 192.168.1.112.

Here is the error that I get when I try to access the Setup.asp file in the Snitz directory.

The database could not be opened !!
Check your config.asp file and set the
strConnString so it points to the database.
Also check if strDBType is set to the right databasetype.

Code : 80004005

Error Description :
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

Can anyone help, please?

Rog

AnonJr
Moderator

United States
5768 Posts

Posted - 11 December 2007 :  11:06:19  Show Profile  Visit AnonJr's Homepage
Three things:

First - Don't post your username and password (unless its for a public testing account) - especially your root user! That applies for the address to your DB Server too... Change your password NOW. (and change it to something a little more secure)

Second - You are going to want to set up a separate user on your DB Server because you do not want the forum to run as root. This user will need the ability to add/modify tables.

Third - You need to install the MyODBC drivers on your MySQL server. This should take care of that particular error message.

Edited by - AnonJr on 11 December 2007 11:07:04
Go to Top of Page

rogersmithiii
Starting Member

16 Posts

Posted - 11 December 2007 :  11:10:58  Show Profile
Thanks. I'll give the ODBC a shot. BTW, I changed all of the information when I posted the question, so none of the posted info applies to my server. Thanks for the warning however.

I'll let you know if the drivers work.

Rog
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 11 December 2007 :  11:17:56  Show Profile  Visit AnonJr's Homepage
quote:
Originally posted by rogersmithiii

BTW, I changed all of the information when I posted the question, so none of the posted info applies to my server. Thanks for the warning however.
Ok, just checking. In the past there have been some innocent souls who didn't realize they should do that.

Because ASP needs an ODBC (or and OLEDB) driver to connect, you'll need the MyODBC drivers.

Let us know if you run into any other issues.

Edited by - AnonJr on 11 December 2007 11:18:22
Go to Top of Page

rogersmithiii
Starting Member

16 Posts

Posted - 11 December 2007 :  11:18:26  Show Profile
Well, the error changed.

The database could not be opened !!
Check your config.asp file and set the
strConnString so it points to the database.
Also check if strDBType is set to the right databasetype.

Code : 80004005

Error Description :
[MySQL][ODBC 3.51 Driver]Host 'ptest.sys-works.com' is not allowed to connect to this MySQL server.

ptest.sys-works.com is the name of the test web server where SNITZ is running (the 192.168.1.112 computer).

Rog
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 11 December 2007 :  11:22:35  Show Profile  Visit AnonJr's Homepage
I'm more of a SQL Server guy, but I would imagine that you would have to set your MySQL server to accept outside connections. That's at least what the error is implying.
Go to Top of Page

rogersmithiii
Starting Member

16 Posts

Posted - 11 December 2007 :  11:23:43  Show Profile
BTW, I'm getting the same error if I try to access MYSQL using the GUI interface. Ptest.sys-works.com is not allowed....
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 11 December 2007 :  11:28:39  Show Profile  Visit AnonJr's Homepage
All I can say is:

Courtesy of http://xkcd.com/



Being an MS guy, my next troubleshooting step is restart and see if it still doesn't work...
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 December 2007 :  11:49:11  Show Profile  Send ruirib a Yahoo! Message
Open the MySQL command line client and type:

GRANT ALL PRIVILEGES ON *.* TO root@'ptest.sys-works.com' IDENTIFIED BY 'your-root-password'


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

rogersmithiii
Starting Member

16 Posts

Posted - 11 December 2007 :  13:22:42  Show Profile
I think that trying to use the root was a problem because root only had local access to MYSQL. I created a user, and told MYSQL to grant that user all privileges from anywhere, and that solved the problem getting into the setup window.

One question: In order for SNITZ to work or for you to configure SNITZ, what privileges does the user have to have? All privileges, or a subset? Running the setup program suggests that the user doesn't have the correct privileges. Command denied to user... I tried "grant all privileges to the user from anywhere, but that didn't seem to do it.

Thanks again for your time,

Rog
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 11 December 2007 :  13:34:45  Show Profile  Send ruirib a Yahoo! Message
Well for setup just grant them all. I never bothered much with that.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

rogersmithiii
Starting Member

16 Posts

Posted - 11 December 2007 :  17:20:21  Show Profile
quote:
Originally posted by AnonJr

All I can say is:

Courtesy of http://xkcd.com/



Being an MS guy, my next troubleshooting step is restart and see if it still doesn't work...



For some reason, flushing privs didn't work. Rebooting did.

Thanks guys.

Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 11 December 2007 :  18:01:37  Show Profile  Visit AnonJr's Homepage
As long as its working.
Go to Top of Page

rogersmithiii
Starting Member

16 Posts

Posted - 11 December 2007 :  19:12:29  Show Profile
It's not working. The setup executes, but I'm now getting a slew of errors, all telling me that various and sundry things can't have a default value.

***********************

[MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]BLOB/TEXT column 'F_DESCRIPTION' can't have a default value
strSql: CREATE TABLE FORUM_FORUM ( CAT_ID int (11) DEFAULT '1' NOT NULL , FORUM_ID smallint (6) NOT NULL auto_increment, F_STATUS smallint (6) DEFAULT '1', F_MAIL smallint (6) DEFAULT '1' , F_SUBJECT VARCHAR (100) DEFAULT '' , F_URL VARCHAR (255) DEFAULT '' , F_DESCRIPTION TEXT DEFAULT '' , F_TOPICS int (11) DEFAULT '0' , F_COUNT int (11) DEFAULT '0' , F_LAST_POST VARCHAR (14) DEFAULT '' , F_PASSWORD_NEW VARCHAR (255) DEFAULT '' , F_PRIVATEFORUMS int (11) DEFAULT '0' , F_TYPE smallint (6) DEFAULT '0' , F_IP VARCHAR (15) DEFAULT '000.000.000.000' , F_LAST_POST_AUTHOR int (11) DEFAULT '1' , F_LAST_POST_TOPIC_ID int (11) DEFAULT '0' , F_LAST_POST_REPLY_ID int (11) DEFAULT '0' , F_MODERATION int (11) DEFAULT '0', F_SUBSCRIPTION int (11) DEFAULT '0' , F_ORDER int (11) DEFAULT '1' , F_DEFAULTDAYS int (11) DEFAULT '30' , F_COUNT_M_POSTS smallint (6) DEFAULT '1' , F_L_ARCHIVE VARCHAR (14) DEFAULT '' , F_ARCHIVE_SCHED int (11) DEFAULT '30' , F_L_DELETE VARCHAR (14) DEFAULT '' , F_DELETE_SCHED int (11) DEFAULT '365' , F_A_TOPICS int (11) DEFAULT '0' , F_A_COUNT int (11) DEFAULT '0' , PRIMARY KEY (CAT_ID, FORUM_ID), KEY FORUM_FORUM_FORUM_ID(FORUM_ID), KEY FORUM_FORUM_CAT_ID(CAT_ID))
Error: -2147467259 [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]BLOB/TEXT column 'M_SIG' can't have a default value.


Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 11 December 2007 :  20:03:20  Show Profile  Visit AnonJr's Homepage
Are you using 3.4.06?

Edit: This might help too... [link]

Edited by - AnonJr on 11 December 2007 20:05:27
Go to Top of Page

rogersmithiii
Starting Member

16 Posts

Posted - 11 December 2007 :  20:15:13  Show Profile
More progress. Found a message on this forum.

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=64954&SearchTerms=Error:,-2147467259

I had to open inc_create_forum_mysql.asp, and had to remove the TEXT DEFAULT '' , in a bunch of lines, and replace it with TEXT,


From this -
strSql = strSql & "F_DESCRIPTION TEXT DEFAULT ' ' , "

To this -
strSql = strSql & "F_DESCRIPTION TEXT,


I had to do this for any variable that had a TEXT DEFAULT setting on it. There were around 10 of them. Did a "search and replace" using Wordpad.

The setup then completed without error.



So in summary, I had to

+ Install the ODBC drivers from the MYSQL page along with the MYSQL software.

+ Create a new Database in MYSQL, and give a user complete privileges to this database, as well as allow the user to access the database from something other than the local host.

+ Get rid of all of the "TEXT DEFAULTS" in the inc_create_forum_mysql.asp file before running the Setup.ASP script.

+ Run the setup.asp program, and use this newly created user to create the necessary tables in MYSQL.


We'll see what blows up next :-)

Rog

Edited by - rogersmithiii on 11 December 2007 20:24:30
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07