Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-01-25 03:43:16

stellularx
Member
Registered: 2005-05-06
Posts: 13

Moving installation to new host, importing database and MySQL error

Hi,

I’m sorry if I may sound like such a newb, but I really don’t know how to fix this error.

I’m currently transferring all my textpattern files from one host to another using this tutorial: http://textpattern.net/wiki/index.php?title=Moving_Installation_from_one_Host_to_Another

I’ve figured out everything at the beginning, but as soon as I have to import the database (phpMyAdmin part), I get this error:

SQL query:


— Database: `<name of database>`

CREATE DATABASE `<name of database>` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

MySQL said: Documentation
  1. - Access denied for user ‘<current user>’@‘localhost’ to database ‘<name of database>’

Do you know how I can fix this because I really want to transfer all my files. :(

Offline

#2 2009-01-25 17:03:19

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving installation to new host, importing database and MySQL error

What I always do is export/import the database tables, not the entire database. So this would be the steps:

  1. in phpMyAdmin (old host) first open your database, then choose ‘Export’, select all tables, and then continue as laid out in the Textbook article
  2. create a new database on the new host
  3. in phpMyAdmin (new host) open the database, and choose ‘Import’

This should work.

Offline

#3 2009-01-25 22:49:49

stellularx
Member
Registered: 2005-05-06
Posts: 13

Re: Moving installation to new host, importing database and MySQL error

when you mean select all tables, what exactly are those?

sorry if that sounds lame.

here are my options:
textpattern
textpattern_category
txp_category
txp_css
txp_discuss
txp_discuss_ipban
txp_discuss_nonce
txp_file
txp_form
txp_image
txp_lang
txp_link
txp_log
txp_log_mention
txp_page
txp_plugin
txp_prefs
txp_section

does that mean all with ‘txp?’

thank you very very much.

Offline

#4 2009-01-25 23:23:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving installation to new host, importing database and MySQL error

All tables in the database. Normally, that is ‘textpattern’ and everything with ‘txp_’, I assume ‘textpattern_category’ is created by some plugin, so don’t forget that one.

Offline

#5 2009-01-26 15:37:49

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Moving installation to new host, importing database and MySQL error

I don’t use phpMyAdmin much, but I believe the options you want (under Export) are:

add DROP DATABASE

add DROP TABLE

because a phpMyAdmin SQL export includes a CREATE DATABASE statement, and you can’t do that if there is already a database with the same name, unless you “drop” it first.


Code is topiary

Offline

#6 2009-01-26 16:21:58

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving installation to new host, importing database and MySQL error

jsoo wrote:

because a phpMyAdmin SQL export includes a CREATE DATABASE statement, and you can’t do that if there is already a database with the same name, unless you “drop” it first.

That is why I always export/import the tables and not the database, and also because hosts often add a prefix to db names so that you can’t create a database of the same name as the old one.

Offline

#7 2009-01-26 17:45:40

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Moving installation to new host, importing database and MySQL error

My mistake (as I said, I don’t use phpMyAdmin much ;-) ); I was looking at Export for the mysql server as a whole, not for the particular database. Which is possibly what the OP did?


Code is topiary

Offline

#8 2009-02-03 08:32:57

stellularx
Member
Registered: 2005-05-06
Posts: 13

Re: Moving installation to new host, importing database and MySQL error

It did work when I exported all of those.
However, as I finished all of the instructions in the Textbook article http://textpattern.net/wiki/index.php?title=Moving_Installation_from_one_Host_to_Another , when I go to my textpattern URL, it says. Database Unavailable.

I mean I already have my MySQL database set.

And I have configured my config.php using the tutorial:

<?php
$txpcfg[‘db’] = ‘your database name’;
$txpcfg[‘user’] = ‘your mysql username’;
$txpcfg[‘pass’] = ‘your mysql password’;
$txpcfg[‘host’] = ‘mysql.yourname.com’;
$txpcfg[‘table_prefix’] = ;

The following two values may require you to contact Support to find them out:
$txpcfg[‘txpath’] = ‘/home/.some_name/site_username/yourname.com/textpattern’;
$txpcfg[‘doc_root’] = ‘/home/.some_name/site_username/yourname.com/’;
?>

Do you guys know what’s wrong? :) Thanks so much!

Offline

#9 2009-02-03 09:06:10

darinlang
Member
From: Olympia Washington
Registered: 2009-02-02
Posts: 12
Website

Re: Moving installation to new host, importing database and MySQL error

stellularx wrote:
when I go to my textpattern URL, it says. Database Unavailable.

possibly the database name is wrong and/or doesn’t exist and/or the host address is incorrect and/or the path(s) in Admin>>Preferences are wrong.

I had problems with all of those when transferring local to the net.
make sure the config.php is correct.
then go into the admin and update the paths in preferences in both the basic and advanced tabs

if that doesn’t work you might want to first try doing a clean install of a new textpattern because it tends to check everything as you go along, and then once its in place and running just replace everything.

Offline

#10 2009-02-03 09:35:39

stellularx
Member
Registered: 2005-05-06
Posts: 13

Re: Moving installation to new host, importing database and MySQL error

Should I just use this tutorial and have a fresh textpattern install?

http://www.graphicpush.com/moving-txp-from-one-install-to-another

Offline

#11 2009-02-03 14:52:11

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Moving installation to new host, importing database and MySQL error

That is also a way to do it, but keep in mind that rss_admin_db_manager doesn’t work on all hosts, depending on their security settings.

Offline

#12 2009-02-07 11:07:31

stellularx
Member
Registered: 2005-05-06
Posts: 13

Re: Moving installation to new host, importing database and MySQL error

Yeah. I’m asking my host about it since I got a ‘Restricted Area’. What should be the settings for this?

Offline

Board footer

Powered by FluxBB