Jump to content

Transferring from localhost to server?


Recommended Posts

Hello all,

 

I'm new here and a slight newbie so please be gentle. I have bits and pieces of knowledge regarding html, css, js and php but nothing extensive and sometimes I feel I'm just missing some basics.

 

I have a few bugs that I'd like to discuss on this forum to see what you guys think but before I do I'd like to be able to show you a live running version of my site, but this is where a new newbie problem arises.

 

I'm just using the free 000webhost.com hosting for now until the designs done and then I'll go get my own hosting. I've tried to follow the prestashop guide for transferring a site but it doesn't seem to be working. The part where I upload the files to the server is eeeeasy, and I do it with filezilla but I can't grasp the database bit, I have no idea.

 

I've exported the localhost database through myphpadmin, and it's given me a nice little .sql file. When I try to import this through myphpadmin in the server control panel however, I get this error

 

Error

SQL query:

--

-- Database: `ds_database`

--

CREATE DATABASE `ds_database` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

MySQL said: b_help.png

#1044 - Access denied for user 'a5507168_ds'@'localhost' to database 'ds_database'

 

Now, I can understand that the database names are different and the server name is different so I'm guessing I need to match them? But how?

 

I opened the settings.inc.php file on the server to change the details but everything I do just chucks up this same error.

 

Please help me sort this out so I can trouble you's with even more problems ;-P

 

Thanks in advance.

Lovely community (I've been hanging around a while, just never signed up.)

Link to comment
Share on other sites

Woh, woh, woh! Newbie here.

 

Could you break the procedure of it down to baby steps. I'm struggling to work it out.

 

I'm not sure whether this free web hosting allows any changes to the user name, it has a prefix that can't be changed... for all databases.

 

I see no permission altering buttons either. I think this hosting may be limited.

 

Anything I can change on the prestashop side of things to make it work?

 

Screenshot_zps10a4db7f.png

Edited by jamieianosborne (see edit history)
Link to comment
Share on other sites

Just edit the db you want to import and look for that line:

CREATE DATABASE `ds_database` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

and change to:

-- CREATE DATABASE `ds_database` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

 

and you should be fine.

Link to comment
Share on other sites

so if you imorted the database, then in config file define the new database credentials

njP8Bs5.png

 

open the file /config/settings.inc.php

 

define('_DB_SERVER_', 'HOST_HERE');
define('_DB_NAME_', 'DATABASE_HERE');
define('_DB_USER_', 'USER_HERE');
define('_DB_PASSWD_', 'PASSWORD_HERE');
define('_DB_PREFIX_', 'ps_');

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...