I was setting up a website for my girlfriend with the hosting service 1&1. Her first website, she was hoping to eventually build up an online forum of poets with critiquing of styles and forms. Happy to oblige, I thought she'd find Drupal fairly easy to manage.

I successfully created the database using:
mysql -h internalsub.perfora.net -u mydatabase -p mydatabase < database/database.mysql

Then I set the connect string to:
$db_url = "mysql://mydatabase:mypass@internalsub.perfora.net/mydatabase";

Yet, when I try to load any drupal page I get:
Access denied for user: 'mydatabase@infong241.us.perfora.net' (Using password: YES)

I'm utterly bewildered by this because the IP addresses aren't even the same. One is internal, the other is external. Tried, just as an experiment, to set the internal IP instead of the the internal name, with no better results.
Yet I can sign in using mysql fine, do a show tables; it is all there.

Help?

Comments

Anonymous’s picture

I have drupal running on 1&1 just fine. I had a small amount of tinkering to get the DB up, but not much. I can't remember the details, but while I look them up, here's some tips. BTW I assume you're using the free promotional package, which is an amazing deal for anyone else reading this.

-remember that you don't get to name your (single) database. Use the crappy name they provide.
-also that the db username is neither your SSH nor contract username.
-backing way up, did you create the database first with the web tool? Dunno if that matters, I assume you must have if the SQL script worked.

Hmm. I think I had a similar problem briefly, I'll log in and see if I can remember anything more specific. The main tip though is that it wasn't anything really wierd to fix, just some trivial details about their free accounts as opposed to root on your own server.

kyber’s picture

I created database using their web interface, and used the name they provided.
It worked for creating initial drupal database tables, as noted.
Maybe I just need to give their system a little time. Perhaps it is just that I created the database an hour ago.

Anonymous’s picture

I suspect it's just a typo, but just to be sure: You should have "myusername:mypass@whatever/mydatabase" rather than "mydatabase:mypass@etc"...note that their assigned MySQL username is *not* the assigned database name, just very similar.

kyber’s picture

They got me.
dbo vs db for the database user versus database name.
I carefully copied in for initial import, but when it came to creating the signin string, I did precisely that, I used the database name thinking they were identical.

My stripped version reflects that assumption.
Thanks!!!

natsirtm’s picture

with db and dbo..

kyber’s picture

Did you ever figure out the magic_quotes_gpc thing?
Getting that warning message, trying to see if I can get that setup right.

kyber’s picture

Hm.
This page seems to have an answer.
http://php.weblogs.com/stories/storyReader$465
Good enough for me!

I wonder why Drupal doesn't do that itself instead of just complaining.
Or maybe warn once, then use that code.

kyber’s picture

http://acko.net/dump/magic_quotes.patch
Actual patch file for Drupal so that isn't a requirement anymore.
Thanks UnConeD!

rayray’s picture

I think 1and1 has a great offer, definitely take advantage of this while it lasts. Unfortunately, they offer neither the ImageMagick nor the GD library, so you can't do anything with your images but link to them. So sad. Other than that, they're pretty good. I haven't had many problems with Drupal, but couldn't get phpCollab to work at all.

Donovan’s picture

I am hosting a Drupal site using the free Professional Hosting Package on 1and1 as well. I just found the following post explaining how to install imagemagic on 1and1.com. I have not tried the referenced instructions, but here's the URL:

http://s88567960.onlinehome.us/forums/index.phps=0812c49f0754313e7a18e18...

I am an absolute Drupal/php newbie so I can't vouch for the above since I have not tried it, nor do I know enough to know why it would/would-not work on the merits.

If you try it, please post your results.

Donovan.

"It always seems impossible, until it is done."
- Nelson Mandela

Donovan’s picture

Yes. ImageMagick is now working flawlessly on my 1and1 hosted account. There are a few tricks to accomplish this, but they are all outlined in the thread referenced above. Good luck.

"It always seems impossible, until it is done."
- Nelson Mandela

Chris Johnson’s picture

I've got a Drupal site up and running on 1and1 using that great offer, but I can't get the rewrite rules to work for clean URLs. mod_rewrite is enabled; 1and1 actually uses some rewrite rules in their httpd.conf file even.

I wrote to 1and1's customer support about this question, but they never answered, not even to say "we don't know no" or "go away, it isn't supposed to work."

So, has anybody out there managed to make rewrite work for them on a 1and1 hosted site?

mikemee’s picture

See my postings at http://groups.yahoo.com/group/1and1/message/13 and http://groups.yahoo.com/group/1and1/message/14. It explains step by step how to get this going - including how to get modrewrite working (you need to add/uncomment the "RewriteBase /" command into your .htaccess file.

Taran’s picture

***UPDATED***

It helps if you upload the proper .htaccess file as you specified.

In short, I stepped in it. Good idiot check for others, though, so keeping it around.

---------------------------------------------------------------------

I tried clean linking, and modified the .htaccess file as you suggested.

Didn't work for me. Not only that, I can't seem to log back in to undo it. Argh... looks like a fresh reinstall on the horizon if I can't log in to even undo the rewrite stuff. Or maybe it's in something I missed while following your stuff. Will rework, redo, redo, rework.

And if it takes over 2 hours, reinstall. *sigh*

DT101010’s picture

I struggled with getting the magic quotes setting to work in the .htaccess file and wasn't able to get it working. I found however, that if you copied the php.ini file, which is somewhere in /var/usr/local... and turn off magic_quotes in that file and place that in your site root, that will override the system php.ini file.

The few things that I did with my 1&1 account is that i compiled my own imagemagick and jhead programs, pulled out the binaries I planned to use and deleted the rest. For the image module all you need is "convert" and then a compiled "jhead" for EXIF info.

As far as the database went, I installed phpmyadmin into my account and for me that is much easier to use when manipulating the database than their built in util or creator.


Hope that all helps, I struggled with the magicquote problem and almost gave up on Drupal because of it.

mikemee’s picture

To get Drupal running on 1and1, including database mysql command, clean urls and also ImageMagick, see my posts here:

http://groups.yahoo.com/group/1and1/message/13
http://groups.yahoo.com/group/1and1/message/14
http://groups.yahoo.com/group/1and1/message/21

and also the thread here for more on ImageMagick (inspired from my original post above):

http://s88567960.onlinehome.us/forums/index.php?showtopic=222&st=0&

Hope this helps! Note that I cannot get Drupal HEAD (latest CVS) to run on 1and1. See http://drupal.org/node/view/5164. Hopefully this has been solved by now - haven't tried in a couple of weeks.