UBB.Dev
Posted By: hatter ... import my database into mysql under linux - 07/09/2003 5:20 AM
I'm currently using Threads under a windows environment and am in the process of converting my server over to Red Hat 9 (Shrike). I am able to successfully setup threads as a fresh installation under linux. However, whenever I import a threads database, things break all of a sudden. I always get a page full of these errors:

Code
<br />Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/ubbthreads/mysql.inc.php on line 131<br />SQL ERROR: Database error only visible to forum administrators<br />


I'm not sure why this happens only on import. Is there something I have to do when converting from a windows based mysql to a linux based?

I'm using the following versions:
mySQL : mysql Ver 12.20 Distrib 4.0.13, for pc-linux (i686)
PHP Version 4.2.2
Apache HTTP Server Version 2.0

Thanks
how are you trying to import it? Via command line, or phpMyAdmin?
I'm doing it by command line. First I drop the database that was created from the "fresh install". The steps are approximately:

mysqladmin drop WWWThreads
mysqladmin create WWWThreads
mysql WWWThreads < WWWThreads.dump

I can access the imported threads with phpMyAdmin, and the config scripts are staying the same as far as the user/pass that has access to the database.
After doing some more searching here on the forums, I found a tip from Navaho that shows more information about the error. The tip can be found at this link (Showing details when admin cant login)

Here is a more detailed error message:
Code
 <br />SQL ERROR: Unable to do_query: SELECT U_FrontPage, U_Groups, U_TimeOffset,U_Display,U_Favorites,U_WhichForums,U_Categories,U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned FROM w3t_Users WHERE U_Number = '' <br />Table 'WWWThreads.w3t_Users' doesn't exist <br />


I doublechecked, and the table is there. I did notice one thing. In the code above, w3t_Users, the users is capitalized. When I view the database in MyPhpAdmin, it shows up in all lowercase, w3t_users.

Could this be the problem? And, if so, how do I change the database to match up? Thanks again
Something to check is if the fields are properly labled as far as case goes. On windows it doesn't matter becuase w3t_AddressBook = w3t_addressbook but on Linux it does not.

Here's a related link:

https://ubbdev.com/forum/showfl...collapsed&sb=5&o=186&fpart=1

Hope that helps.


Thanks! I'm sure now that this is the problem!!!
Your welcome. Thanks to Omegatron too. I was aware of this solution just never got around to posting it... lol
Oh God this issue again. Yeah that one really got me a while back. Glad to see the SQL LIST will do some good.
Yeah, this has bit me before.
Thanks Omegatron, I was really pulling my hair out over that!
If I had hair to pull out I would have been doing the same when I went through that issue.
© UBB.Developers