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
Page 1 of 3 1 2 3 >


Moderator:  Gizmo 
Who's Online
0 registered (), 27 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks