mnogoclient + mysql can't connect to DB when trying to automatically configure

Bug #286996 reported by Alex Mayfield
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
mnogosearch (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: mnogosearch-common

1. Ubuntu 8.04.1
2. mnogosearch-client & mnogosearch-mysql v. 3.3.6-1ubuntu0.1
3. Connects to database and runs the included scripts
4. MySQL driver: #1045: Access denied for user 'root'@'localhost' (using password: NO)

I basically wanted to experiment with mnogosearch on my own local computer, so I set up mysql with a basic root/root account with access to everything. I'm aware that's not the most secure way to do things, but since it has no access to the outside world, I don't really care. I then installed mnogo-common and mnogo-mysql. When it got to the configuration part, I selected the following options:

Overwrite Config Files: yes
Indexing: blob
Database: mysql
Username/Pass: mnogosearch/mnogosearch
DB Name: mnogosearch
Is database local?: Yes (I have also tried saying 'no' and then using localhost/3306 for the host/port with the same results)
Automatically configure DB?: Yes
DB Admin user/pass: root/root

End result:
MySQL driver: #1045: Access denied for user 'root'@'localhost' (using password: NO)
14 queries sent, 0 succeeded, 14 failed

It's as if I had not typed in anything for the password, since I then tried
$ mysql --user=root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
$ mysql --user=root --password=root
Welcome to MySQL (blah blah blah)
mysql>

What's going on?

Revision history for this message
zlisinski (zlisinski) wrote :

I have also encountered this issue in mnogosearch-common_3.3.7-3 on Jaunty. What is happening is the .deb packages config script prompts you for your configuration settings, but at the very end it erases the passwords you have supplied. When the postinst script runs, it expects the passwords to be in the debconf database, but they are not. This causes all the database calls to fail when the postinst script runs '/usr/sbin/indexer -Edrop' and '/usr/sbin/indexer -Ecreate'. The call to '/usr/sbin/mnogosearchconfig' also creates the config files (indexer.conf and search.htm) with missing passwords in the DBAddr command.

The solutions seems to be to move the clearing of the passwords from the config script into the postinst script.

If the package is already installed, modifying the scripts /var/lib/dpkg/info/mnogosearch-common.config and /var/lib/dpkg/info/mnogosearch-common.postinst, then running 'dpkg-reconfigure mnogosearch-common' will setup the database and config files properly.

Revision history for this message
zlisinski (zlisinski) wrote :

Ignore the last attachment, use this one instead.

Revision history for this message
Jeff Taylor (shdwdrgn) wrote :

Lucid; mnogosearch-mysql; Version: 3.3.8-2build1

This bug still appears to be present with the following error:
MySQL driver: #1045: Access denied for user 'root'@'my.server.name' (using password: NO)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mnogosearch (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.