News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Moving my SMF Database to new host, help!!!

Started by GleamPlay.com, August 22, 2013, 10:20:04 AM

Previous topic - Next topic

GleamPlay.com

Hi, I am trying to move my whole website/forum to another host. From biz.nf to neq3.com.
I downloaded the public_html and uploaded it.
Then I download the database and upload to another host, but it says my MySQL database name and username is different and don't work.
What should I do?
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

kat

Change them, so they work?

Sorry, if that seems a bit flippant. But, this isn't, really, a problem with SMF.

You know the database name and the password. We don't.

You could try this:

http://wiki.simplemachines.org/smf/Repair_settings.php

But, if you don't know the correct password, there's absolutely nothing that we can do, to help, I'm afraid.

GleamPlay.com

I know the password and username.
The username for my old database is uXXXXXX_string [X represent a number]
and the username for my new 1 is XXXXX_string
I don't think they allow me to change the front numbers  :(

what does repair_settings do? I read that wiki, but I don't really understand, does it help to change username and password?
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

kat

If you know what they are/should be, yeah. Give it a go and see how you get on.

GleamPlay.com

but I don't think I can change the database username

also, what will repair do?

how can I move my database to new host? :)
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

emanuele

You don't have to change the database name and password of the *database*.
You have to pick the new database name, username and password and change them in the SMF's configuration. ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

GleamPlay.com

it says:

CREATE DATABASE  `1435448_string` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

MySQL said: Documentation

#1044 - Access denied for user 'u416690382_user'@'localhost' to database '1435448_string'
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Storman™

Do you have a control panel for your hosting like cPanel ?

If so then I think you need to grant yourself access to that database which you can do in your hosting control panel.

GleamPlay.com

Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

emanuele

Quote from: leonyipa on August 23, 2013, 02:07:49 AM
it says:

CREATE DATABASE  `1435448_string` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

MySQL said: Documentation

#1044 - Access denied for user 'u416690382_user'@'localhost' to database '1435448_string'
According to your post above, 'u416690382_user' is the username of your *old* database, so you have not yet changed the username in Settings.php using repair_settings.php. ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

GleamPlay.com

I downloaded repair_settings and uploaded it to my old host.
I changed the username, database name and password, anything else I need to change?

After changing, what should I do?
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

GleamPlay.com

my repair_settings.php shows:
Fatal error: Call to undefined function db_fatal_error() in /srv/disk2/1435449/www/gleam.co.nf/Sources/Subs-Db-mysql.php on line 106

did I break the forum  :(
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

emanuele

Quote from: leonyipa on August 23, 2013, 03:30:46 AM
how to use repair_settings?
Reading this:
Quote from: K@ on August 22, 2013, 10:46:54 AM
You could try this:

http://wiki.simplemachines.org/smf/Repair_settings.php

Quote from: leonyipa on August 23, 2013, 03:47:07 AM
my repair_settings.php shows:
Fatal error: Call to undefined function db_fatal_error() in /srv/disk2/1435449/www/gleam.co.nf/Sources/Subs-Db-mysql.php on line 106

did I break the forum  :(
At least now the password is correct. O:)

When do you get this error?
Just loading repair_settings page?
Or when you save?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

GleamPlay.com

Nevermind, the are no more problems now.

Do I need to change MySQL Database Info only, or MySQL Database Info and Paths & URLs?
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

GleamPlay.com

I get this error every time I press Save Settings
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!


emanuele

You have to change *any* field that has changed during your host transfer, so, off the top of my head:
* mysql user
* database name
* database password
* board path
* sources path
* themes paths
* attachments paths


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

GleamPlay.com

but everytime I press Save Settings, it says
Fatal error: Call to undefined function db_fatal_error() in /srv/disk2/1435449/www/gleam.co.nf/Sources/Subs-Db-mysql.php on line 106

do I need to upload the Subs-Db-mysql.php again or?
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

emanuele

Then open your ftp account (or use the file manager of your host), open Settings.php and manually change the paths with the new ones...
Which those are...I think your host should be able to tell you (probably even from within the administration panel, cpanel or alike).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

GleamPlay.com

I change the Settings in my old forum(many things there) or new forum(empty)?

So I don't need to use repair anymore?

Thanks emanuele :)
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

GleamPlay.com

After changing, do I upload the Settings back to old host, and download the Database information from phpmyadmin, and upload to new host?
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

GleamPlay.com

Is moving the smf to another host a really complicated thing or did I just messed up the whole thing :( ?
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GleamPlay.com

sorry, but I don't really understand :(

this is my understanding, is it correct or:
1) Download all files from old site and upload to new site
2) Change the Setting.php
3) How about the database? What I need to do?
4) Is it complete in Step 4?

my english is not really good, sorry for misunderstanding :(
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Kindred

1) download all files froim old site
2) upload all files to new site
3) export/download database from old site
4) import/upload database to new site
5) find out values for settings on new site (database name, username, password, and host and also the path to files)
6) Change Settings.php with those values (on the new site)
7) Run repair_settings.php to correct thigns like themes directories, etc
8) check any mods which you have which may also specify directories/paths (media gallery, downloads, mod, etc)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GleamPlay.com

thanks,
but in step 3(download) and 4(upload), I faced difficulties.

I don't know if my download step or upload step is wrong, probably the download step.

it shows
Quote from: leonyipa on August 23, 2013, 02:07:49 AM
CREATE DATABASE  `1435448_string` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

MySQL said: Documentation

#1044 - Access denied for user 'u416690382_user'@'localhost' to database '1435448_string'
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Kindred

I thought we alreayd covered that....

on your new host
create a database using the standard hosting tools.
Go into phpmyadmin
select "import"
choose the previously acquires export file of your old database
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GleamPlay.com

#27
yes, but on my new host phpmyadmin, when I import the database from old host, it shows that error


also, when I am dowqnloading the database, I followed the steps mentioned in http://wiki.simplemachines.org/smf/Backup
and I am struck in step 9( Under "View dump (schema) of database", you'll see "Export". )

I can't find the word View dump (schema) of database
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Illori

if your sql file has a line like

CREATE DATABASE  `1435448_string` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

remove it, your new server can not create that database.

GleamPlay.com

after removing it, it says
#1044 - Access denied for user 'u416690382_user'@'localhost' to database '1435449_string'

Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Storman™

Similar to what I said above, have granted user 'u416690382_user' access to the 1435449 database ?

Go into cPanel and the database section.

Click on "MySQL Databases".

Scroll down and find "Add User To Database".

Under user you want u416690382_user and under database you want 1435449 from the dropdowns. Select them and then click "Add". Now you need the give that user PRIVILEGES. Select ALL PRIVILEGES for now and click "Make Changes" to save.

Now go back and try importing the SQL file again ...

Illori

that will only work if that user exists on the server, i have a feeling that is left over from the old host. how exactly was the database backup done?

Kindred

It is sounding like the user used some sort of backup from the host rather than the export function in phpmyadmin.... Since export does not take the database name or user....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GleamPlay.com

Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Sir Osis of Liver


Is your forum still running on the old host?

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

GleamPlay.com

my old forum is gleam.co.nf
my new is gleam.cu.cc

[I did nothing to the old forum]
[my new forum is empty]
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

GleamPlay.com

I cannot find Add User To Database and my page MySQL Databases is very short, cannot scroll :(
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

GleamPlay.com

Quote from: Kindred on August 24, 2013, 04:08:19 PM
It is sounding like the user used some sort of backup from the host rather than the export function in phpmyadmin.... Since export does not take the database name or user....

I used the export in Phpmyadmin 3
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Sir Osis of Liver


New forum appears to be running correctly with scratch database.  You need to export your old database from old host using phpmyadmin, then import it to your new db on new host using same.  phpmyadmin is accessed via your host control panel in the MySql database section.  As long as you haven't trashed the db on your old host, you're ok.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

GleamPlay.com

I used phpmyadmin, and the errors I mentioned appearred
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Chalky

Try again. In phpmyadmin of your old forum, select the name  of the database and you will see the screen populate with all the tables. Then go to export. I suggest you keep all the default settings and save to your computer.

Then go to the phpmyadmin of your new forum, click on the database name, select all tables and choose the option "Drop". This will fully empty out your new forum's database so it would be advisable to save a backup of this first since you at least have a working forum.  Then choose Import and select the database you have just taken from your old forum.

GleamPlay.com

I dropped all, but still:
#1044 - Access denied for user 'u416690382_user'@'localhost' to database '1435449_string'

Quote from: Storman™ on August 24, 2013, 10:21:11 AM
Similar to what I said above, have granted user 'u416690382_user' access to the 1435449 database ?

Go into cPanel and the database section.

Click on "MySQL Databases".

Scroll down and find "Add User To Database".

Under user you want u416690382_user and under database you want 1435449 from the dropdowns. Select them and then click "Add". Now you need the give that user PRIVILEGES. Select ALL PRIVILEGES for now and click "Make Changes" to save.

Now go back and try importing the SQL file again ...
I cannot find Add User To Database and my page MySQL Databases is very short, cannot scroll :(
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

emanuele

Quote from: leonyipa on August 25, 2013, 04:03:47 AM
I dropped all, but still:
Why do you drop everything all the times... *rolleyes*

Heck just send me the usernames and passwords and I'll move it for you.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

GleamPlay.com

I dropped all of the new host, coz new host is empty, so it doesn't matter?

Thanks, I will send you my user/pass to your PM.

Also, can you teach me how to move afterwards? Because I really wanted to learn it just in case I want to change host again.

Thanks :)
Gleam - http://gleamplay.com
The SMF to have fun, meet new friends and play games!

Jhananda

Hi my name is Jeffrey Brooks.  I run two SMF forums. I hope you do not mind me replying to this thread, but I am in a similar situation of moving my SMF forums to a new server.  I seem to have everything in place to the point of uploading the databases.  The uploader on my new host only allows for 10m files, and my databases are 30m and 117m.  So, what do I do?  Do I break the databases up into 10m pieces, or find another way to upload my databases?

Kindred

I would suggest checking with your new host...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

KalEl025

I've seen that same db error when I was switching hosts recently. Create the database separately, via phpMyAdmin preferably, then delete the CREATE DATABASE from the sql. Some hosts, such as godaddy, don't like granting create privileges to imported files. As long as you manually create the db, delete the line from your sql, and make sure you import within that db, you should be fine.

Jhananda

Quote from: Kindred on December 11, 2013, 12:00:14 AM
I would suggest checking with your new host...
Thanks, I did, and I uploaded my databases to my website, and they moved them for me.

Thanks.

Advertisement: