WordPress Migration SQL error

Hi,
Im trying to migrate servers for my Wordpress. I have done this previously and have succeeded fine. This time something seems to be going wrong and it is giving me the following error message
#1146 - Table 'happyd16_wrdp4.wp_commentmeta' doesn't exist

the code is
CREATE TABLE IF NOT EXISTS `wp_commentmeta` (
`meta_id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`comment_id` BIGINT( 20 ) UNSIGNED NOT NULL DEFAULT '0',
`meta_key` VARCHAR( 255 ) COLLATE utf8_unicode_ci DEFAULT NULL ,
`meta_value` LONGTEXT COLLATE utf8_unicode_ci,
PRIMARY KEY ( `meta_id` ) ,
KEY `comment_id` ( `comment_id` ) ,
KEY `meta_key` ( `meta_key` )
) ENGINE = INNODB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci AUTO_INCREMENT =1;

Open in new window


thanks in advance,
Vinnie
damixaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineNo oneCommented:
What happens if you just execute the above code independent of any import?
0
Julian HansenCommented:
How are you doing the data migration?

- Are you dumping the database to an SQL script and then running that on the new server?

- Is happyd16_wrdp4 the name of the database on your new server or your old server?

wp_commentmeta is the first table in the WordPress list of tables - so I am guessing that the entire script is failing.

This could be that at the start of the script you have a

USE Database statement (Where database might be set to happyd16_wrdp4)

And this is the problem because your new database is called something else.

If there is a USE statement you can remove it and apply the script directly to your new database.

If this does not solve the problem then check that the user you are using to update the MySQL server has the rights to create tables.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
damixaAuthor Commented:
a couple of other things
How are you doing the data migration?

- Are you dumping the database to an SQL script and then running that on the new server?

- Is happyd16_wrdp4 the name of the database on your new server or your old server?

wp_commentmeta is the first table in the WordPress list of tables - so I am guessing that the entire script is failing.

This could be that at the start of the script you have a

USE Database statement (Where database might be set to happyd16_wrdp4)

And this is the problem because your new database is called something else.

If there is a USE statement you can remove it and apply the script directly to your new database.

If this does not solve the problem then check that the user you are using to update the MySQL server has the rights to create tables.

I dont know if you feel comfortable of me accessing your server. If so, give me the info and I will gladly take a look.
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Julian HansenCommented:
Could you explain your last post ?
0
magentoCommented:
Hi,

As JulianH stated, you should check the database name in both the servers.

Probabaly you need to replace the old name of db and the import should be just fine.

Thanks,
Magento
0
damixaAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.