Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
mysql migration dreamhost
I just signed up with dreamhost and I want to dump my database in a newly created DB over on the new host. I have tried to do this with what little understanding of all this I have, but dreamhost runs things differently than my previous host.
Does any one have any suggestions?
Thanks,
Matthew
EDIT : Per the my last post on this thread :
I ended up taking one table over at a time. First I did a fresh install, but put kept my images folder intact. I couldn’t figure out how to import to replace the original file in the destination host so I dropped the tables on the destination host. Exported one table at at time from host of origin, imported one table at a time into the destination host. In the end, everything transferred well. I left some of the discuss tables, and the log tables, as those weren’t important to me at this point. I am still in testing phases. I did have to go through PhpMyAdmin and redo my password to be able to get into the txp interface, and the textbook proved helpful there.
I don’t quite understand why migrating the entire db wouldn’t work?
I don’t know if this is an unstable or less than perfect way to do this, but thus far, it seems to work well.
Hope it helps anyone who searches this thread.
Matthew
Last edited by ma_smith (2005-10-01 12:47:37)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#2 2005-09-29 01:12:53
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: mysql migration dreamhost
Perhaps you can tell us what’s not working, and what Dreamhost does differently?
Alex
Offline
Re: mysql migration dreamhost
Zem,
I am getting these errors:
Warning: mysql_connect(): Unknown MySQL server host ‘work’ (1) in /home/.emperior/ma_smith/artiswork.org/textpattern/lib/txplib_db.php on line 26
Warning: mysql_get_server_info(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.emperior/ma_smith/artiswork.org/textpattern/lib/txplib_db.php on line 27
Warning: mysql_get_server_info(): A link to the server could not be established in /home/.emperior/ma_smith/artiswork.org/textpattern/lib/txplib_db.php on line 27
Warning: mysql_select_db(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.emperior/ma_smith/artiswork.org/textpattern/lib/txplib_db.php on line 32
Warning: mysql_select_db(): A link to the server could not be established in /home/.emperior/ma_smith/artiswork.org/textpattern/lib/txplib_db.php on line 32
Warning: Cannot modify header information – headers already sent by (output started at /home/.emperior/ma_smith/artiswork.org/textpattern/lib/txplib_db.php:26) in /home/.emperior/ma_smith/artiswork.org/textpattern/lib/txplib_db.php on line 360
AND when I try to import the sql file, I get this error in phpmyadmin
SQL-query:
— phpMyAdmin SQL Dump
— version 2.6.3-pl1
— http://www.phpmyadmin.net
—
— Host: localhost
— Generation Time: Sep 28, 2005 at 07:36 PM
— Server version: 4.1.13
— PHP Version: 4.3.11
—
— Database: `work_datahead`
—
CREATE DATABASE `work_datahead` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
Matthew
Last edited by ma_smith (2005-09-29 16:52:51)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#4 2005-09-29 23:27:12
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: mysql migration dreamhost
Warning: mysql_connect(): Unknown MySQL server host ‘work’
Looks like the database host is set incorrectly in config.php. It’s almost always ‘localhost’.
AND when I try to import the sql file, I get this error in phpmyadmin
I can’t see an error message there.
Alex
Offline
Re: mysql migration dreamhost
> zem wrote:
> Looks like the database host is set incorrectly in config.php. It’s almost always ‘localhost’.
Unfortunately, Dreamhost is one of those “almost always” exceptions.
ma_smith, this should help.
Create MySQL Subdomain, Database, and Database User
New MySQL domains and databases take about an hour to become active on DreamHost, so do this step as early as possible. MySQL domains and databases are created in the MySQL control panel, in the “Goodies” section. MySQL domains are special; don’t create your MySQL domain in the regular DreamHost domain control panel.
- Use the DreamHost MySQL control panel to add a new database. Give it a name you will remember, e.g., wpblogdb. The name you choose has to be unique across the DreamHost shared servers, though.
- Then use the DreamHost MySQL control panel to add mysql.domainname.com as a MySQL hostname for your database. If you already have a database using that sub-domain, use something like mysqlwp.domainname.com.
- Create a new user, e.g., dbadmin, for this database.
- Give the dbadmin user a password – hardtoguesspassword
Your database will not be usable until the Status column says “active” for both the user and the MySQL hostname. This may seem a little convoluted but the advantage is that all the MySQL operations take place on different physical servers than the actual web hosting… if that is an advantage. Don’t ask me. :)
The above was borrowed from Installing WordPress at DreamHost
Last edited by michaelkpate (2005-09-29 23:41:44)
Offline
Re: mysql migration dreamhost
zem,
this was the error:
- - Access denied for user ‘artiswork’@‘64.111.96.0/255.255.240.0’ to database ‘work_datahead’
Michael:
Thanks. I already created the database and host. This is how I have my config.php file configured:
<code>
<?php
$txpcfg[‘db’] = ‘artiswork’;
$txpcfg[‘user’] = ‘artiswork’;
$txpcfg[‘pass’] = ‘xxxxxxx’;
$txpcfg[‘host’] = ‘work’;
$txpcfg[‘table_prefix’] = ‘’;
$txpcfg[‘txpath’] = ‘home/ma_smith/artiswork.org/textpattern’;
?>
</code>
the db name is artiswork, the user is artiswork, the pw: is the xxx, the host is work, ma_smith is the user (also an ftp user).
the db I had configured on my old host was the work_datahead. (see above)
Is there a password or username issue in there somewhere? Argh. This stuff is crazy. Thanks, both of you for your help,
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#7 2005-09-30 00:54:25
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: mysql migration dreamhost
Is there a password or username issue in there somewhere?
Yes. Could be an incorrect username or password; or it could be that your web server hasn’t been granted access to the mysql server.
Alex
Offline
Re: mysql migration dreamhost
do you have any recommendations? I really don’t know where to go from here?
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: mysql migration dreamhost
This is from the config file from one of my TxP Dreamhost installations.
$txpcfg[‘host’] = ‘mysql3.patetech.info’;
Notice that host is a fully-qualified domain name. Just entering ‘work’ won’t work on Dreamhost. You need to actually enter the domain name. What you are doing is telling the server to connect to the equivalent of http://work/
Offline
Re: mysql migration dreamhost
I changed some of the config settings and now I get this error from artiswork.org
Warning: extract(): First argument should be an array in /home/.emperior/ma_smith/artiswork.org/textpattern/publish.php on line 56
Unknown section default
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: mysql migration dreamhost
What I usually do when moving a database from one host to another is do a brand-new clean install, check to make sure it is working, and then copy the tables. You might want to try that.
p.s. If you don’t want to do it that way, I can see from visiting http://artiswork.org/textpattern/ that you really need to delete the setup folder.
Offline
Re: mysql migration dreamhost
hmm.
Michael, how do you copy tables. Is it similar to a dump? Learning, thinking, learning, thinking….
Thanks for all your input.
(Thankfully, artiswork, has next to no data except page, section, style, etc. As I haven’t really launched yet, which would make it easier to do the clean install route.
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline