I only have intermittent internet access, so I work on my site offline using wamp. So I'd like to upload when i do have internet access.
I upload the entire drupal folder to my website, but when I browse to it, it gives me:

The mysqli error was: Access denied for user 'user1'@'localhost' (using password: YES).

How can I fix this?

I am able to change mysql privileges through my hosting provider's interface.

Also, what is the best way to upload your changes after you've done some work offline? Is there a quick way, without uploading the entire folder again?

Any help greatly appreciated...

Comments

lionheart8’s picture

You need to edit your database settings.

It is getting "user1'@'localhost" as the user set in the file => sites/default/settings.php of your Drupal folder.

Look for the lines looking like

* Database URL format:

* $db_url = 'mysql://username:password@localhost/databasename';

* $db_url = 'mysqli://username:password@localhost/databasename';

* $db_url = 'pgsql://username:password@localhost/databasename';

*/

$db_url = 'mysqli://user1:yourWAMPuserDBPassword@localhost/yourWAMPdbName;

$db_prefix = '';

Replace the DB username/DBpassword/DBNmame with those you set on YOUR ONLINE Cpanel. If you have not created a database, do so as you need that info.

After that, the site should be accessible.

joep.hendrix’s picture

You cannot work offline!
Well, you can but then you will need to dump your local database and load it into the remote database.

-----------------------------------------
Joep
CompuBase, Drupal websites and design

-----------------------------------------
Joep
CompuBase, Dutch Drupal full service agency

lionheart8’s picture

Thanks JoepH for pointing outing out something I forgot.

Regarding the ONLINE database, ...
You need to create one and then IMPORT the Drupal tables you have on your PC, and then edit those lines in settings.php so that the name of the online database + the password, db hostname and dB name correspond with those in it.

If you had uploaded all Drupal folder files, there is no need to upload them again, only the above file needs editing.

If you all do that, the online Drupal site should be a mirror of that on your PC.
If uploading updates, just remember not to overwrite settings.php of your online site or the database settings wont work again.

mailking’s picture

We are constantly on the road. I've designed our website 6 years ago in GoLive. I am looking for a more modern approach. I have been tipped by a friend to look into Drupal. I have a MAMP system running and are looking ways to port our original site into Drupal.

The one thing I am not keen on, is the online uploading stuff. I am used to work offline all the time until it is time to get things on the web. I am using FTP to upload the changes.

Is there no way to synchronise [with or without FTP] the local and the remote database? Or to build a publish/sync button into my Drupal site that would allow only the latest changes since the last update?

-------------------------------------------------------------
since 2003 an antique LandCruiser BJ45
Karin-Marijke + Coen on their big adventure
http://www.landcruising.nl
-------------------------------------------------------------

joep.hendrix’s picture

You are used to work with static html files (Go live). Sure you can work on them locally and then upload them.
Drupal does not work that way. The html you see in your browser is generated by the Drupal engine based on thousands of settings in your database.

If you really need to work locally, I would advise to make a copy of your on line Drupal environment locally.
Create your content locally.
At the end of the day, you only need to upload the attachments if any.
And use the excellent module Backup & Migrate to synchronize the local database with the remote database.

-----------------------------------------
Joep
CompuBase, Drupal, websites and webdesign

-----------------------------------------
Joep
CompuBase, Dutch Drupal full service agency

mailking’s picture

Okay, thanks. I got the basics and I uploaded my local database. It still needs some tweaking, but I will get there.

Now the next step:
- I will bring the site online and content is being added over time.
- meanwhile I will work locally on new ideas and projects that I want to implement later.

How then can I get these changes onto the live site without losing the added content?

herojig’s picture

I am trying to do the same thing. I am wondering where this excellent module Backup & Migrate is? Is that drupal, or are you referring to MySQLdump? ha! I need to find this excellent thingee...

Phoenix.Consultants.Nepal (www.phoenixstudiosnepal.com)

Roadmobile’s picture

Backup and Migrate can be found here.

Back up and restore your Drupal MySQL database and files or migrate a site between environments. Backup and Migrate supports gzip, bzip and zip compression as well as automatic scheduled backups.

With Backup and Migrate you can dump some or all of your database tables to a file download or save to a file on the server or offsite, and to restore from an uploaded or previously saved database dump. You can choose which tables and what data to backup and cache data is excluded by default.