phpMyAdmin (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


womble -> phpMyAdmin (9/4/2006 16:37:55)

Okay, Wombley's having a slight nervous breakdown here. Due to my web hosts being total idiots (and that's putting it potitely), I'm having to move some domains which include forums on them. No problem - in theory - I simply copy all the backed-up files to the new server and restore the database....hah! I wish it were so simple!

Due to an unavoidable delay in transfer domains I'm having to use the server's IP address to access my new account, but that's the least of my worries currently. I've been having problems using the phpMyAdmin that comes with my cPanel (doesn't help that I've no idea really how to use phpMyAdmin apart from following idiot-guide "how-to's" found online - and I thought phpMyAdmin was supposed to make b0rking dealing with MySQL easier!!!)

Anyway, following instructions found on phpBB (http://www.phpbb.com/kb/article.php?article_id=264) I've managed to install phpMyAdmin on my new account, and I can log into it and stuff and see that there's precisely no databases there at the moment, and I've set up and uploads directory that the database backuo's been ftp'd to, but I'm having problems importing the database.

I've set an upload directory and the database backup is coming up in the web server upload directory list, but when I press 'go' it either thinks about it endlessly and eventually I get an error message saying that a script on the page has stopped responding and an option to continue or stop script (pressing either does nothing), or I get the following message:

quote:

SQL query:

#
# phpBB Backup Script
# Dump of tables for ecanusn_phpbb3
#
# DATE : 04-09-2006 13:31:07 GMT
#
#
# TABLE: phpbb_auth_access
#
DROP TABLE IF EXISTS phpbb_auth_access;

MySQL said: Documentation
#1046 - No database selected


My skills at b0rking MySQLs is legendary, and I'm starting a db course in a month or so, so maybe then I'll have some sort of clue wtf it all means, but currently I've no idea what this means, or what I can do about it, and I am currently losing what few marbles I have left while ODing on caffeine and nicotine.

A desperate Wombley would be grateful for any ideas. [:(]




yb2 -> RE: phpMyAdmin (9/4/2006 17:22:02)

I don't know anything about phpMyAdmin, but you need to add

Use youdatabasenamehere
go


at the top of the script before the DROP statement.




Spooky -> RE: phpMyAdmin (9/4/2006 17:33:02)

Youll still need to create a database to hold the data?
In the first instance - once mySQL is running, you should be able to create the new database then import from the uploads directory?




womble -> RE: phpMyAdmin (9/4/2006 17:36:30)

Did I mention I'm a total dimwit when it comes to MySQL? When you say "at the top of the script before the DROP statement" do you mean in the text file that's the database backup?

<edit>Ooops! Spooky nipped in while I was typing!

How do I create the new database? (I think I mentioned I'm a total dimwit when it comes to databases) I know in my control panel I can create a database in the cPanel thingy. If I created a database with the same name and user as the one I'm trying to import, would that work?




Spooky -> RE: phpMyAdmin (9/4/2006 17:47:07)

If you create a database in cpanel, does it show as a valid database catalog in myphpadmin?
(btw - I dont use it much myself!)




jaybee -> RE: phpMyAdmin (9/4/2006 17:51:41)

Wombly.

I usually create the database and set the permissions in cpanel
then use phpMyAdmin to run the SQL to get the tables and data into the database.

You can also manually create the tables in MyAdmin then feed the data in with SQL.

Yes Spook it does.




yb2 -> RE: phpMyAdmin (9/4/2006 17:58:25)

if you get stuck but can run SQL directly then you could use something like this to set up the databases, and then you can run your imports.

IF NOT EXISTS myDatabaseNameHere THEN

CREATE DATABASE myDatabaseNameHere
END IF
go




womble -> RE: phpMyAdmin (9/4/2006 18:01:36)

Yep, I created a new database in the cPanel and it's coming up in phpMyAdmin...

Should I try importing the backup again?




womble -> RE: phpMyAdmin (9/4/2006 18:06:02)

Eeeek!

Okay, so how do I run SQL? (told you I was a dimwit with databases!)

Looking at phpMyAdmin, if I click on the SQL tab it brings up a textbox that says "Run SQL query/queries on server localhost" - should I type what yb2 said in there?




yb2 -> RE: phpMyAdmin (9/4/2006 18:11:20)

No, don't run what I wrote last, you've already done that. I've just installed phpmyadmin so I'm trying to work out what to do, but perhaps Jaybee or Spooky know?




womble -> RE: phpMyAdmin (9/4/2006 19:27:57)

Okay, figuring I can't do any harm to any empty database I went ahead and tried importing the backup again. It at least seemed to be doing something this time...right up until the error message appeared...

quote:

SQL query:

USE ecanusn_phpbb3;

MySQL said: Documentation
#1044 - Access denied for user 'xxxxxxxx'@'localhost' to database 'ecanusn_phpbb3'


[:(] [sm=tantrum.gif]

I take it that's referring to the database username and password, but I can see no reference to it in the file (presumably it's encrypted in the database?). I can't set up a database user with the same name as with the old hosts because the new hosts preffix the username with a different name, so I'm not sure what to try now.

I've been trying to figure out this whole moving/restoring thing for 15 hours solid and nothing's making much sense now, so I guess it's time to head off to bed. Whether I'll sleep after all the caffeine I've consumed today to keep me going I don't know, but I'll try again in the morning.

[:(]





yb2 -> RE: phpMyAdmin (9/4/2006 19:47:55)

I've been working those sorts of hours lately, so I sympathise with you. If you can't sleep I'll be up tonight working, so you can chat to me! ( if an offer like that doesn't help you get to sleep, I don't know what will! :)

My PHP isn't working, I must've done something but don't know what so can't get phpMyAdmin working (sigh). But if you are able to run any sql, you could try this

GRANT USAGE ON *.* TO 'xxxxxxx'@'localhost' GRANT Select, Insert, Update, Delete,
ON `database`.* TO 'xxxxxxx'@'localhost'

that will set up an restricted account that php could use to connect to mysql


hope you get it working!




womble -> RE: phpMyAdmin (9/5/2006 9:09:21)

Thanks for the suggestion yb2, but for some reason it didn't like the syntax of that (I don't know enough about SQL to know why).

The good news is that I eventually managed to restore my forum. I managed to restore the database using Bigdump which splits the import into bite sized chunks to get round the low upload limit. I had to run a SQL installer thingy to fix the database because one of the mods on the forum seemed to have partially dropped off during the move, and that mod's sort of not working any more, but it wasn't a vital one, and I really don't care - at least the forum's back up and running and my forum members aren't wandering homeless around the web looking for a forum to shelter in.

Thanks for the help guys.




womble -> RE: phpMyAdmin (9/5/2006 12:59:02)

w00t!

Two minor miracles in one day - I managed to restore the phpBB, and convert it to a fully functioning (so far) SMF!

[sm=yupi3ti.gif]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.09375