Log in

View Full Version : Some Help With phpMyAdmin Please.


ecchi
2016-05-11, 05:35 AM
I am trying to copy ClitPass' database to another domain, so I can play about with scripts without risking buggering up the main database. I assumed I just hit "export" on ClitPass' phpMyAdmin, then "import" on the new domain's phpMyAdmin. However:

"Export" works. I get a text file with a .sql extension that contains the database tables and some stuff I don't understand (but assume the software needs). When I hit "import" in the other domain there is a delay where (I assume) it us uploading the file via web transfer. Then I get the following error message:

Error
SQL query:


MySQL said:

#1046 - No database selected

What am I doing wrong, and what should I be doing to make it work?

Cleo
2016-05-11, 09:58 AM
I don't use PhpMyAdmin for dumps and restores.

I log into my server to open up a shell to my server.

To Dump
/usr/bin/mysqldump -u'DATABASENAME' -p'DATABASEPASSORD' --opt 'DATABASENAME' > /PATHTODUMP

To Restore
mysql -u 'DATABASENAME' -p 'DATABASENAME' < /PATHTODUMP

mOrrI
2016-05-11, 08:09 PM
Did u export with quick export method?

Most probably you didn't select a Database or your export script doesn't have the create database statement.

mOrrI
2016-05-11, 08:10 PM
also if u want to play around and test modify, new theme.
without having to upload everything or be online

take a look at:

https://www.apachefriends.org/index.html

Nymph
2016-05-11, 09:55 PM
OK, granted it's been awhile since I have done an export, but if I remember correctly, there are different formats you can export in.

I used to export in every format I could just to cover my ass.

ecchi
2016-05-12, 06:09 AM
Thanks, I appear to have got it now. Although I also appear to have loaded the database twice, so I have two entries for every link. Not a problem, now I know what I did wrong (or think I know) I guess I can delete the table and reload it.