Uploading DB

Websun

New member
Joined
Nov 12, 2004
Messages
2
I just moved to a new ISP.
Now, I would like to know how I can upload my MySql db.
I normally use ftp, but I can't find where to put the db.

I have looked at the phpMyAdmin Control Panel, but it will only create or EXPORT a db, not import it.
I have created a db with the same name in the DirectAdmin Ctrl Pnl, which does appear in phpMYAdmin Ctrl panel, but it does not show in my FTP.

I have looked at the DirectAdmin Control Panel, but it will only upload a backup.
I created a backup of the empty db and copied it into my db.
Then I Gzipped the file of the db.
But when I tried to upload it as a 'backup', I got an error message saying: "Unable to restore database xxx_yyyy: ERROR 1045: Access denied for user: 'xxx@localhost' (Using password: YES) gunzip: stdout: Broken pipe"
I have no idea what that means, but I suspect that it did not find the two MySql files close enough.
So I am back to where I started.

FTP would be the most elegant solution.
How can I find where they hide the db?
I hate to have to recreate the whole database with all its tables and data.

Any suggestions for my upload?

Cheers!

Websun
 
first create a database in DA
then goto phpmyadmin
select the db you just created
goto 'sql'
click browse
browse to your .sql fiel( uncompressed sql dump)
and upload it....if its not too big, this should work
 
Upload successful!

I followed your procedure.
It worked like a charm!

Thanks very much!!!!!
That was a great help :D

Websun
 
sander815 said:
first create a database in DA
then goto phpmyadmin
select the db you just created
goto 'sql'
click browse
browse to your .sql fiel( uncompressed sql dump)
and upload it....if its not too big, this should work

what if the backe up mySQL database is like 10 or 20mb? how can i do a restore? phpMyAdmin won't allow that due to the limitation of php.
 
etegration said:
what if the backe up mySQL database is like 10 or 20mb? how can i do a restore? phpMyAdmin won't allow that due to the limitation of php.

i tried:

mysql -u root -p -h localhost username_dbname < backup.sql

but i get a access denied. using the user's name also does not work. Any ideas?
 
DirectAdmin does not setup the root user I believe. da_admin is the equivalent though. The username and passowrd for this account can be found in /usr/local/directadmin/conf/mysql.conf


Code:
mysql -uda_admin -pthe_password username_database < file.sql
 
Last edited:
jmstacey said:
DirectAdmin does not setup the root user I believe.
I tested it on 2 servers, on one, I could logon as root. On the other one, I could not, but this is due to the fact root isn't allowed to login. I checked the mysql database User table, and found root sitting there.
So I guess it's possible :D

(Note: Using something like root to do this, might be a bit overkill).
Most of the time a normal mysql user can do it too.
 
Back
Top