Page 1 of 1

More problems moving CMS database

Posted: Mon Jun 01, 2009 11:29 pm
by susiegb
I really hate having to display my lack of understanding yet again on a topic you guys helped me with before - see http://forum.cmsmadesimple.org/index.php/topic,33147.0.html ... But - although I successfully uploaded my CMS site to my test site and worked on it there, now that I'm pretty much finished and want to make it live I'm again having problems trying to move it. I don't think they're the same, but ...

Basically I have a hosting account with Axishost.com, where as well as my website being located, I also sub-host other client sites. So I set up a new area for my client (complete with cpanel, options for mySQL databases etc etc) I created a database there, created a couple of users (me and the client) and added us both to the database with full privileges. I had previously exported the database from my test site down to my computer (in zip format). In my client's area, when I went to phpMyAdmin and tried to import the exported database - well two things. Firstly I couldn't do it if I was logged into my client's area under my username (via Webhost manager) - got an error msg. So then I logged in using the client username and password and it wouldn't let me - gave me this msg:

"SQL query:

--
-- Database: `susiegb2_greendoor`
--
CREATE DATABASE `susiegb2_greendoor` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

MySQL said: Documentation
#1044 - Access denied for user 'eileenh2'@'localhost' to database 'susiegb2_greendoor'
"

(Greendoor is part of my website name though I never gave the database that name!) And I did try making 'eileenh2' a user of that database and exporting it again, but that made no difference.

I never had any problem like this uploading from MAMP - has anyone got any suggestions for this very-challenged person?!!

:)

Re: More problems moving CMS database

Posted: Mon Jun 01, 2009 11:54 pm
by jmcgin51
just because you created a user named abc doesn't mean they have the permissions they need to do x function.  Does eileenh2 have the required permissions to create a db?

Re: More problems moving CMS database

Posted: Tue Jun 02, 2009 12:20 am
by susiegb
Hmm - I've gone back and checked. I may not have set it up correctly with full privileges. I've re-done it all and made extra sure she has 'all privileges'. It also appears I can't have a username in MySQL with a '2' at the end of it, which may have confused me!

Can't go any further from work () - will have to wait till I get home this evening. I'll update again then.

thanks
- susie

Re: More problems moving CMS database

Posted: Tue Jun 02, 2009 12:25 am
by Peciura
Hi, first of all i think you should migrate to utf-8 (but it is not neccesary ) http://forum.cmsmadesimple.org/index.php/topic,15578.msg160093.html#msg160093

It looks like you are trying to craeate DB once more. Delete line "CREATE DATABASE `susiegb2_greendoor` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;" or somethimg similar  from the top of your .sql file.

'susiegb2_greendoor'  makes it easier for server admin to manage accounts and permissions. Look at screenshots.

P.S. do you use phpMyAdmin to administer your DB ?

Re: More problems moving CMS database

Posted: Tue Jun 02, 2009 1:19 am
by susiegb
Peciura wrote: Hi, first of all i think you should migrate to utf-8 (but it is not neccesary ) http://forum.cmsmadesimple.org/index.php/topic,15578.msg160093.html#msg160093
I looked at the instructions in that link and it looks far too complicated for a user like me I'm afraid!!
Peciura wrote: It looks like you are trying to craeate DB once more. Delete line "CREATE DATABASE `susiegb2_greendoor` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;" or somethimg similar  from the top of your .sql file.

'susiegb2_greendoor'  makes it easier for server admin to manage accounts and permissions. Look to screenshots.
Well, I guess I can unzip it and try that. Will it just open as a text file?

But - how do I just download the tables (that's what I'm supposed to be bringing across, isn't it? I only saw the option to export the whole file in phpMyAdmin ...

:)

Re: More problems moving CMS database

Posted: Tue Jun 02, 2009 1:25 am
by Peciura
dummy.sql is a text file loaded with sql queries. You can edit it with notepad, or you can use better editor such as Notepad++.
Go to your DB and there should be import tab.

Re: More problems moving CMS database

Posted: Tue Jun 02, 2009 3:21 am
by replytomk3
This might help you: http://mkrd.info/software-discussions/cms-made-simple/backin-up-and-restoring-cmsms.html (at the bottom). If you are using a query like on the bottom, you might have to use the trick I outlined. When I tried import from one database from another, phpMyAdmin did not work (timed out and no errors displayed, file too big?), neither did SSH (shell) mySQL import (database name did not match). Only when I renamed all table names did I get this to work.

If I am wrong, then well, I am wrong.