Debian, VBox, MySql database

For a clean database, I can install a new drupal 7 site through browser. After installation it asks me automatically for maintenance user name and password. After that, I can login and logout without problem.

Things are different when using drush si. First I clean the database, so it exists but has no tables. The directory mydomain.local does not exist under sites. I am running this as a simple user and the whole Drupal installation is within my home directory. This is the command which I run from existing drupal installation directory:

drush site-install --sites-subdir=mydomain.local --db-url=mysql://user_mdm:mypassword@localhost/mydomain --debug

There are no erors except for this one at the very beginning:

Calling system(mysql --database=information_schema --host=localhost --user=tabea_krf --password=1xdpuBvBnoe53S2DYq2W < /tmp/phpI76qe5);
ERROR 1227 (42000) at line 1: Access denied; you need the RELOAD privilege for this operation

But then all goes ok and the site is installed.

Except that I cannot log in using admin/admin. But that's not all.

After using command:

drush upwd admin --password="newpassword" --debug

I still cannot log in using admin/newpasword.

After using command:

drush uli

there is a link to reset password, after clicking it and then clicking "Log in" button takes me to page where I can specify a new password. I can access all administration area.

I can also create new content. However, although there is no visible error during saving, the content is not saved. It does not appear in the "Content" admin view.

Additionally, after logging out, I cannot log in using the new password.

This process of installing with drush si was repeated 3 times already, each time the result is the same. I double checked that the sites/mydomain.local/files directory is writable by everybody (if it has any meaning)

Any ideas?

Comments

raincloud’s picture

I also compared changing user password using a "normal" working installation and using my problematic install. On a normal installation, after changing password, there appears a message "The changes have been saved" at the top of screen. On my installation, there is no such message. So probably the password is not written (using the reset password link)

greg.1.anderson’s picture

Sounds like you should give your mysql user RELOAD privs and try again.

If this is not possible / not convenient, then perhaps we could look at supporting the --db-su / --db-su-pw ops for that particular mysql call; then you could pass in a more privileged user for the install. Maybe we already support that; I did not check. Give it a try.

raincloud’s picture

I tried with no luck. I ran the drush si for fresh install command as mysql root with --debug option and everything went ok, no errors at all. But the result is the same, so it must be something else.

kristofferwiklund’s picture

Version: 7.x-4.4 » 7.x-4.5

Hi

I have the same problem. But I am using Drush 7.x-4.5.
It seems that after a site installation using Drush. No forms are submitted. Or no value is commited.

I have my Drupal installation in SVN. And it works on my production server. So today I have setup a developer machine local. I have used a internal DNS for it. I can install it using the browser and it works. But using drush the homepage just not submit the forms. So I can not login. Using the "drush uli" allows me to log in. But trying to add content is not submitted. The page reload like a submit but there is not new content.

I will try to debug why..

kristofferwiklund’s picture

I have found the problem.

I had forgot to enable rewrite module in apache
sudo a2enmod rewrite

After this I could login and everything worked. So the problem is that Drush is setting the Clean URL to true. But if you don't have rewrite module enable the url will not work. So then one tries to login, and submitting the form, it goes to http://site/node. That is not working and one gets a 404. But I didn't read the error message because the layout is so close to a normal installation.

The browser installation can handle this case and not enable the clean url's settings. And therefore it is working.

moshe weitzman’s picture

Status: Active » Closed (works as designed)

use --clean-url if you want more control.

stuzog’s picture

Using MAMP with clean urls set, I cannot login with the user name (admin) and password that drush gave me after successful install of Commerce_Kickstart 2.0-dev. It says that no such user exists. drush vget url returns clean_url: "TRUE". Other than that, the site seems to be running fine.

stuzog’s picture

Solution: drush uli gives a one-time login link that enables a password reset.