Ganga
Dec 17 2003, 12:08 AM
Hello guys!
I am having big problems to resrtore a large database (about 30 Mb) from a Windows platform to my Linux box running Cpanel.
I don't know how they can have mySQL running on windows at all, but it's working nicely with a Yabb SE forum.
Now I need to restore this database on my box and I'm having big problems.
I have increased the exectution time for phpmyadmin so that it would work nicely to import large databases, but Internet Explorer crashes every time I try.
Is there a safe way to compress this database into a .gz file so that it can be imported through Cpanel restore feature?
Or, can anyone suggest other ways?
This nightmare has already eaten up too much of my time!
Thanks.
LighthousePoint
Dec 17 2003, 12:18 AM
use SSH, and import like this:
mysql -uroot -p < bacup.sql
Ganga
Dec 17 2003, 12:33 AM
Thanks, where am I supposed to upload the database I have on my desktop now for this to work?
or will SSH prompt me for my local pc directory?
Thanks
LighthousePoint
Dec 17 2003, 01:03 AM
no, you must first upload the database to your server. It's not really important where it goes, because the import process will put everything where it needs to go.
Ganga
Dec 17 2003, 02:03 AM
Thanks mate, I still can't properly understand how I do it.
I have uplaoded the databse in a subdir called "sql" of public_html.
Then I have typed this command:
root@server [/home/curtiptr/public_html/sql]# mysql -uroot -p Enter password:
ERROR 1046 at line 13: No Database Selected
root@server [/home/curtiptr/public_html/sql]#
I know for definite that the èpassword of this backup database is blank.
Line 13 of the database is:
DROP TABLE IF EXISTS yabb_banned;
Why does it say "no Database selected"?
I assume by logic that it's because in that directory there's no database with the table "yabb_banned", so how do I get around the problem?
Thanks!
LighthousePoint
Dec 17 2003, 02:06 AM
how did you perform the backup? Properly done, it should be a TXT file filled with SQL queries...
Ganga
Dec 17 2003, 02:09 AM
Tahnks for the quick reply!
The backup is a Yabb database, done directly through the bulletin board system, and it's data + structure.
LighthousePoint
Dec 17 2003, 02:12 AM
IF it's structure and data, it should just import easily. However, you can also do a proper backup using MySQL.
Ganga
Dec 17 2003, 02:20 AM
I'm sorry, but I may sound totally dumb to you, I'm still in darkness, please let me plead for your patience...
As I said the database is dumped via YabbSe forum which sits on a Windows server (hence my doubt is it proper mySQL format or could it be MS-SQL?).
As far as I'm aware, there's no Yabb Forum version which would work with anything else than mySQL and PHP, so I assume (perhaps wrongly) that the Windows server I'm backing up from must have some sort of module to accept mySQL databases.
So, that's why I can't most likely do what you call "a proper backup using mySQL", as I have no phpmyadmin on the server I'm grabbing the db from nor any shell, as it's Windows!!!
What about cutting the database in "chunks" and then executing the queries in phpmyadmin? Would you say I have a chance for that to work?
Thanks!
Fabio
LighthousePoint
Dec 17 2003, 02:23 AM
It really depends on what that file contains. A "proper" backup will have the queries neccessary to create a db, and populate it with tables and data.
ohvhost
Dec 17 2003, 10:42 AM
Most BBS self-backups dont include the database info. You need to create the database and users/permissions first, then use
mysql -uUserForDatabase -pPassForUser DatabaseName < backup.sql
notice there is no option name/ID for the DatabaseName option
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.