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
 ODBC 5.1 Driver
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Webbo
Average Member

United Kingdom
982 Posts

Posted - 11 November 2017 :  13:46:51  Show Profile  Visit Webbo's Homepage  Reply with Quote
I'll ask the question Huw
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 11 November 2017 :  17:58:44  Show Profile  Visit Webbo's Homepage  Reply with Quote
They have come back to me with the following:

quote:

Thanks for your response,

I have tested this with an ODBC driver, obtained at:
https://downloads.mariadb.org/connector-odbc/3.0.2/

This was able to establish a successful database connection to the server.


When I change the connection string to:

strConnString = "Driver={MariaDB ODBC 3.0 Driver};Server=IPAddress;
UID=odbc_user;PWD=odbc_pw;DB=odbc_test;Port=3306;option=3;"

(without line breaks)

The forum appears to connect to the server that the database is on but when running setup.asp I get the following error:

quote:
There has been an error !!


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





Is ...

strDBType = "mysql"

compatible with MariaDB , ie could this be the issue ?

Edited by - Webbo on 11 November 2017 21:33:42
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 11 November 2017 :  21:33:06  Show Profile  Visit Webbo's Homepage  Reply with Quote
If I change the connection string to:

strConnString = "Driver={MySQL ODBC 5.1 Driver};Server=IPAddress;
UID=odbc_user;PWD=odbc_pw;DB=odbc_test;Port=3306,option=3;"

(without line breaks)

it returns:
quote:


The database needs to be installed !!


You need to create all the tables in the database before you can start using the forum.


Click here to create the tables in the database.

Click here to retry.



Yet the database and tables, etc are on the server


Likewise with...

strConnString = "driver={MySQL ODBC 5.1 Driver};option=16387;server=IPAddress;user=odbd_user;
password=odbc_pwd;DATABASE=obdb_test;Port=3306;" '##MySQL w/ MyODBC v5.1

(without line breaks)

Edited by - Webbo on 11 November 2017 22:09:23
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 11 November 2017 :  23:44:10  Show Profile  Visit Webbo's Homepage  Reply with Quote
I found an article on the net that said that migrating MySQL db to MariaDB could create binary incompatibilities and suggested migrating data by dumping it and importing it in the new database.

So having created a dump I'm giving that a try assuming the file will upload and not time out due to the size
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 12 November 2017 :  00:36:38  Show Profile  Visit Webbo's Homepage  Reply with Quote
Well that didn't work either.

Using {MySQL ODBC 3.51 Driver} or {MySQL ODBC 5.1 Driver} in the connection string returns...

quote:


The database needs to be installed !!


You need to create all the tables in the database before you can start using the forum.


Click here to create the tables in the database.

Click here to retry.



And when I click to create the tables in an already created database the one thing I noticed was there was a connection and 8 tables were created before the script displayed a load of errors similar to:

Error: -2147467259 [MySQL][ODBC 5.1 Driver][mysqld-5.5.56-MariaDB]
Invalid default value for 'CAT_ID'


When viewing the tables in the database the existing tables are all in lower case, the new ones that were duplicated were in upper case.
Does it make a difference if the original tables are in lower case in the database ?

Offline now as I'm knackered
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 12 November 2017 :  08:14:26  Show Profile  Visit Webbo's Homepage  Reply with Quote
Okay, donations in lieu of 'I'm a Genius' please forward to...


SOLVED IT

The issue was multiple,

Firstly the migration process from MySQL to MariaDB didn't work as expected so the resolve was to dump the database from the old server and import it into the new.

Then, for some reason Snitz software, MariaDB or the Linux OS did not like the fact that the table names were in lowercase so running multiple SQL commands to convert them from lowercase to upper case seemed to do the trick

The connection string I used is...

strConnString = "driver={MySQL ODBC 5.1 Driver};option=16387;server=IPAddress;user=odbd_user;
password=odbc_pwd;DATABASE=obdb_test;Port=3306;" '##MySQL w/ MyODBC v5.1



All other databases that were migrated with the exception of one and the Snitz db worked first time, so perhaps it is something to do with the code within both softwares making the db tables case sensitive, possibly
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 12 November 2017 :  21:04:08  Show Profile  Visit Webbo's Homepage  Reply with Quote
Well I spoke too soon, not so much with the above but regarding it all working ok, for some reason topic.asp post.asp post_info.asp threw up HTTP500 errors but these files are modified from the originals. Loading the originals fixed the error but then caused problems with various mods installed including our site supporters... not good

Two ways around it I think, one is to go through a batch of fresh files, ie a new install, and add mods as required until I find out which one(s) don't work - very time consuming
OR, see if it's possible to get my hosts to modify the OS system files so that the Linux version accepts lower and upper case in MySQL.
If that's possible then I can re-import a dump of the database and see if it works without further modification - the easiest route I think

Any thoughts?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20580 Posts

Posted - 13 November 2017 :  10:03:26  Show Profile  Visit HuwR's Homepage  Reply with Quote
by default the snitz code uses UPPERCASE table names when creating the database and in all it's queries, if yours were lower case then they were possibly created outside of the snitz setup code, plus your previous MySQL db must have been set to be case insensitive otherwise it would not have worked.

It my be laborious but you are probably best fixing whatever code/tables needs to be fixed to get the queries to work

MVC .net dev/test site | MVC .net running on Raspberry Pi
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 13 November 2017 :  21:16:05  Show Profile  Visit Webbo's Homepage  Reply with Quote
Our Snitz was first installed about 15/16 years ago Huw and over time it has been upgraded and modified.
The hosts are adamant they will not/can not make it case insensitive for what ever reasons and to be honest I don't have the time to go through the files to see what's what or not, I looked through topic.asp yesterday, all 1500+ lines within ours, and found a couple of bits but not sufficient to resolve the problem.
Likewise to start with a fresh copy of Snitz then add the mods and changes one at a time to find out which or what is causing the issue is again a big task and one I don't have time for at present.

Bearing in mind the future I'm looking at other hosting options as I think the present ones will not be the best option

Edited by - Webbo on 13 November 2017 21:17:52
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 21 November 2017 :  22:17:57  Show Profile  Visit Webbo's Homepage  Reply with Quote
Just an update - I'm in the process of moving hosts
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07