php forum
php mysql forum
php mysql smarty
 
Page 1 of 3 1 2 3 >
Topic Options
#280252 - 10/01/04 02:56 AM Importing the Database
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
I have had to find alternate hosting for my website. Up until now I have had physical access to my machines and haven't had to use FTP/remote management much but this is not the case now. How do I import my existing MySQL database backup into my new MySQL host? I am using PHPMYAdmin but am rather lost at the moment.
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280253 - 10/01/04 08:38 AM Re: Importing the Database [Re: barbiro]
Medar Offline
Junior Member

Registered: 03/19/00
Posts: 571
If you are talking a database of any size (if you have any tables over 5-10 megs), you should use shell access to export your entire database into a gzip file, and then use shell to import it again. <br /><br />Much quicker than phpMyAdmin (which I do swear by).<br /><br />However if it is small - use phpMyAdmin. Could not be easier to do!

Top
#280254 - 10/01/04 02:12 PM Re: Importing the Database [Re: Intel -*RW*-]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
and if you don;t have access to shell most hosting companies will do it for you.
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#280255 - 10/05/04 12:30 PM Re: Importing the Database [Re: 234234]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
hmm-they wont give me shell access but if I send them the file they will put it in. How do I export the db into a zip? I am trying to use PHPMYAdmin on localhost but it doesnt seem to want to save the file.All I get is an empty zip file <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /> I have physical access to the machine so I will be doing it directly (winxp) My db is 28 mb


Edited by ChAoS (10/05/04 02:17 PM)

Top
#280256 - 10/05/04 10:49 PM Re: Importing the Database [Re: barbiro]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
under export you need to save it as a file and it will zip it.
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#280257 - 10/06/04 05:05 AM Re: Importing the Database [Re: 234234]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
aargh! I been doing this all day.It takes forever (as if its timeing out then when it asks me to save it as a zip file it does but the zip is empty.I have even tried saving it as wwwthreads.sql instead of a zip file (which it does) and it saves it as a 28.1mb file.Then when I try to run it it just takes forever and then says "No MySql Queries"
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280258 - 10/06/04 07:18 AM Re: Importing the Database [Re: barbiro]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
ask your old ISP if you can get a copy of your database.. give that to the new ISP?
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#280259 - 10/06/04 10:57 AM Re: Importing the Database [Re: 234234]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
lol-I was my old ISP so yes I have the physical server here.I sent my new host a zipped copy of the mysqldump and I am hoping they can import it via shell.
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280260 - 10/06/04 04:28 PM Re: Importing the Database [Re: barbiro]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
This is what it tells me when I try to import it: <br /> <br />ERROR 2006 at line 7676: MySQL server has gone away <br /> <br />When I export the db which of these should be checked? <br /> <br />View dump (schema) of database <br /> w3t_addressbook w3t_adminsearches w3t_announcements w3t_banned w3t_bannedemails w3t_boards w3t_cache w3t_calendar w3t_category w3t_censorlist w3t_contentislands w3t_displaynames w3t_favorites w3t_graemlins w3t_groups w3t_iipcache w3t_languages w3t_last w3t_mailer w3t_membersearches w3t_messages w3t_moderators w3t_modnotify w3t_online w3t_permissions w3t_pollmain w3t_polloptions w3t_pollquestions w3t_pollvotes w3t_posts w3t_queries w3t_ratings w3t_registration w3t_reservednames w3t_searchresults w3t_subscribe w3t_usernotes w3t_users w3t_usertitles w3t_version <br /> <br /> Structure only <br /> Structure and data <br /> Data only <br /> Export to XML format <br />Select All / Unselect All <br /> Add 'drop table' <br /> Complete inserts <br /> Extended inserts <br /> Enclose table and field names with backquotes <br /> Save as file ( "zipped" "gzipped" )


Edited by ChAoS (10/06/04 04:30 PM)
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280261 - 10/06/04 04:36 PM Re: Importing the Database [Re: barbiro]
Medar Offline
Junior Member

Registered: 03/19/00
Posts: 571
What I have done in the past is check STRUCTURE AND DATA.<br /><br />I then make sure I have my new database named, and then ungzip my file, and load it into the new database.<br /><br />So my .sql file (or gzip if you prefer) is not creating the database, but it is creating and filling all the tables.

Top
#280262 - 10/06/04 05:26 PM Re: Importing the Database [Re: Intel -*RW*-]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
ok I am getting closer-I zipped the actual database (wwwthreads myi etc files) and had him rename them from wwwthredas.* to efs.* etc. But now I am getting this error<br /><br />Script: /usr/www/efs/ubbthreads/ubbt.inc.php<br />Line#: 1617<br />SQL Error: Table 'efs.w3t_Users' doesn't exist<br />SQL Error #: 1146<br />Query: SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid, U_SideBar FROM w3t_Users WHERE U_Number = '' <br /><br /><br />The tabble exists but it is named w3t_Users. Why is it looking for 'efs.w3t_Users'?<br /><br />Thankyou very much for your help <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280263 - 10/06/04 05:45 PM Re: Importing the Database [Re: barbiro]
Medar Offline
Junior Member

Registered: 03/19/00
Posts: 571
Honestly not sure. Question though. What reason did you have the files renamed?<br /><br />Possibly something in that procedure made the error.

Top
#280264 - 10/06/04 05:49 PM Re: Importing the Database [Re: Intel -*RW*-]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
It was a a requirement of my host. Since this is a rental server it is their policy to name the db to associate it with the account I presume. I allready asked to have it renamed and was denied. <br /> <br />[]We can't change the database name, it has to match the identifier for your server. If you are importing an old database in the form of an .sql file, you can change that information right near the top of the file. [/] <br /> <br />They are being accomodating though so I am not complaining at all. <br /> <br />This has got to be a path issue either with IIP or UBBThreads and not the actual database I think. Could it be a permissions issue since I went from Windows to Unix? I uploaded my entire directory as is.


Edited by ChAoS (10/06/04 06:06 PM)
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280265 - 10/06/04 07:34 PM Re: Importing the Database [Re: barbiro]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
> <br />>As I suspected before, this is because the case for your mysql files is different from what your script appears to expect. <br />> <br />>mysql> SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, <br />> -> U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid, U_SideBar <br />> -> FROM w3t_Users limit 1; <br />>ERROR 1146: Table 'efs.w3t_Users' doesn't exist <br />> <br />>mysql> SELECT U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, <br />> -> U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid, U_SideBar <br />> -> FROM w3t_users limit 1; <br /> <br /> <br /> <br />egad! is this a result of going from Windows to Unix? How do I fix this without rewriting Threads?


Edited by ChAoS (10/06/04 08:17 PM)
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280266 - 10/06/04 08:52 PM Re: Importing the Database [Re: barbiro]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
okay in my config file I can't say for instance <br /><br />$config['dbtype'] = "mysql";<br />$config['dbserver'] = "localhost";<br />$config['dbuser'] = "mysqluser";<br />$config['dbpass'] = "yaddayadda";<br />$config['dbname'] = "ubbthreads";<br /><br />I have to say<br /><br />$config['dbtype'] = "mysql";<br />$config['dbserver'] = "localhost";<br />$config['dbuser'] = "mhomedirectory_mysqluser";<br />$config['dbpass'] = "yaddayadda";<br />$config['dbname'] = "mhomedirectory_ubbthreads";<br /><br />so I would look at your config.php in your includes directory and change the lines to<br /><br />$config['dbtype'] = "mysql";<br />$config['dbserver'] = "localhost";<br />$config['dbuser'] = "efs_mysqluser";<br />$config['dbpass'] = "yaddayadda";<br />$config['dbname'] = "efs_ubbthreads";
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#280267 - 10/06/04 10:25 PM Re: Importing the Database [Re: 234234]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Let me clarify my mistake which I am realizing now- I imported a windows MYSql database (which is probably ok) and I also zipped and ftp'd my Windows installed UBBThreads installation <br />to a Linux server instead of installing the Linux version as my board is hacked up.My board is now looking for w3t_Users and what I have is w3t_users and unfortunately all my tables are lower case as the latter and we all know that Linux is not as forgiving as Windows (except in the blue screen case) <br /><br /> So now my question is this.Do I need to actually grab the Linux version of my board and do a proper install and will the database work at that point or is there another way.<br /><br />I am sure this is the problem and also why my MySQLDump .sql <br />file would not function properly because I created the tables with the windows install as well.<br /><br />My mess-Thanks for the help again
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280268 - 10/06/04 10:32 PM Re: Importing the Database [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
If you are moving Windows to Linux, you'll need to rename all the tables. Omegatron wrote a "how to" for this:<br />http://www.ubbdev.com/forum/showflat.php/Cat/0/Number/70437
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280269 - 10/07/04 09:03 PM Re: Importing the Database [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Well I am getting closer thankyou so much.Now I have a variety of errors to deal with some of which may be permissions. For starters do you know what this error is from?<br />Script: /usr/www/efs/ubbthreads/pals/pollpal.php<br />Line#: 85<br />SQL Error: Got error 127 from table handler<br />SQL Error #: 1030<br />Query: SELECT B_Poll,B_Replies,B_Number,B_Board,B_Posted, B_Subject FROM w3t_Posts WHERE B_Number = B_Main AND B_Approved = 'yes' AND B_Board = 'efs' AND B_Poll != '' ORDER BY B_Posted DESC LIMIT 0,1
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280270 - 10/07/04 09:50 PM Re: Importing the Database [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
"SQL Error: Got error 127 from table handler"<br /><br />Error 127 is generally a corrupt table. <br /><br />REPAIR TABLE w3t_Posts <br /><br />should fix it.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280271 - 10/07/04 09:54 PM Re: Importing the Database [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
ooh that is a scary one to use on that particualar table <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" />
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280272 - 10/07/04 09:56 PM Re: Importing the Database [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
We have a list of errors and solutions posted here for reference:<br />http://www.ubbcentral.com/boards/showflat.php/Cat/0/Number/35663
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280273 - 10/07/04 10:48 PM Re: Importing the Database [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Thanks Josh that will help.<br /><br />This error was not on that list though<br /><br /> The server encountered an internal error and was unable to complete your request.<br /><br />Error message:<br />Premature end of script headers: ubbthreads.php
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280274 - 10/07/04 10:56 PM Re: Importing the Database [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
"SQL Error: Got error 127 from table handler" is in that post <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /><br />Towards the bottom of the error section.<br /><br />[]<br />SQL ERROR: Unable to do query: Blah blah blah Got error 127 from table handler<br /><br />Error 127 = Unknown Error / Record File Crashed<br /><br /><br />You can generally look at what table or tables it was trying to Query and run the Repair Table command for that table.<br /><br />For example, if the query throwing the error is the w3t_Posts table, you can try entering this SQL Query:<br /><br />REPAIR TABLE w3t_Posts<br /><br /><br />If this does not work, you may need to ask your webhost to run myisamchk on your database. You can also try dumping and restoring the database with the mysqldump command.<br />[/]
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280275 - 10/07/04 11:02 PM Re: Importing the Database [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
I think you mis-understood. This is a new error that I get. The previous one was fixed by repairing w3t_Posts<br /><br />This error I get when trying to login or go to the Main Index<br /><br />Server error!<br /><br />The server encountered an internal error and was unable to complete your request.<br /><br />Error message:<br />Premature end of script headers: login.php<br /><br />If you think this is a server error, please contact the webmaster.<br />Error 500<br />emeraldforestseattle.nuclearfallout.net<br />Thu Oct 7 21:02:21 2004<br />Apache/2.0.50 (Unix)
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280276 - 10/07/04 11:23 PM Re: Importing the Database [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Ah- I understand now. You got by the post table error.<br /><br />Not sure why you're getting the new error. <br />I'd try re-uploading clean login.php login.tmpl and login.php language files, to make sure there's no corruption there.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280277 - 10/08/04 02:44 PM Re: Importing the Database [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Well I tried toing a REPAIR TABLE on the whole lot of them and that reduced my db from 30mb to 4mb-Thank God for backups
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280278 - 10/08/04 07:35 PM Re: Importing the Database [Re: barbiro]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Any idea what could have caused this? <br />Script: /usr/www/efs/ubbthreads/ubbt.inc.php <br />Line#: 491 <br />SQL Error: Can't open file: 'w3t_Online.MYD'. (errno: 145) <br />SQL Error #: 1016 <br />Query: REPLACE INTO w3t_Online (O_Username,O_Last,O_What,O_Board,O_Read,O_Type,O_Extra,O_Agent,O_Refer) VALUES ('-ANON-208.54.15.1','1097282232','index','','','a','','Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1','') <br /> <br /> <br />Now when I go to the tables It says this about that particular one <br /> <br /> w3t_Online Browse Select Insert Properties Drop Empty in use <br /> <br />and and seems the the file w3t_Online.MYD is no longer in the db folder. All I did was open the entrance page <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /> <br /> <br />SELECT FROM w3t_Users WHERE U_SQL-Hell > '1'; <br />1 results returned <br />ChAoS


Edited by ChAoS (10/08/04 07:41 PM)
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280279 - 10/08/04 08:56 PM Re: Importing the Database [Re: barbiro]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
I am getting closer- I had the host replace the files again and now I get this<br />Table 'w3t_Online' is read only<br /><br />So I emailed him back to change the permissions on the db.I also re-uploaded UBBThreads in ASCII (except images) just in case I didn't thr first time. Now I just wait
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280280 - 10/08/04 10:13 PM Re: Importing the Database [Re: barbiro]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
I am still getting this <br /> The server encountered an internal error and was unable to complete your request.<br /><br />Error message:<br />Premature end of script headers: index.php<br /><br />If you think this is a server error, please contact the webmaster. <br /><br />At this point I am just going to try a fresh install and then maybe restoring a backup from the control panel. I am about ready to throw my hands up on this one. Thanks for all your help everyone <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280281 - 10/08/04 10:29 PM Re: Importing the Database [Re: barbiro]
Medar Offline
Junior Member

Registered: 03/19/00
Posts: 571
Well I am reading along, but the latest errors you are getting is like nothing I have ever run into.<br /><br />But best of luck!

Top
#280282 - 10/10/04 02:44 PM Re: Importing the Database [Re: Intel -*RW*-]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
I am going to try a fresh install of the Linux version.Maybe the fact that I zipped my Windows installed UbbThreads folder is the problem.
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280283 - 10/14/04 08:59 PM Re: Importing the Database [Re: barbiro]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
How do I restore a db backup from the new control panel in 6.5?
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280284 - 10/14/04 09:45 PM Re: Importing the Database [Re: barbiro]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
No restore function for the database only a backup option you will need to manually do the import thru phpMyAdmin.
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#280285 - 10/15/04 12:32 AM Re: Importing the Database [Re: 234234]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Yeah, generally if your database is d0rked up, you can't get to the admin panel anyway. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280286 - 10/15/04 03:37 AM Re: Importing the Database [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
This is really frustrating.The board runs fine on my windows machine.I can create and restore backups just fine but when I try to import it to this new host it just freezes.He has even tried to import it via shell with the same results.
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#280287 - 10/15/04 05:52 PM Re: Importing the Database [Re: barbiro]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
I think this may be a permissions issue because I can install a fresh copy of 6.5 that uses the database but has none of my stylesheets and look but when I do an upgrade I get the server 500 error now. <br /> <br />Error message: <br />Premature end of script headers: ubbthreads.php <br /> <br />And my host referred me to this <br /> <br />http://64.4.53.250/cgi-bin/linkrd?_lang=...%2dhosting%2316 <br /> <br /> <br />I have followed these instructions to the letterhttp://www.ubbcentral.com/support/docs/ubbthreads/UBBthreads_Unix_install.html...are these instructions up to date?


Edited by ChAoS (10/15/04 06:01 PM)

Top