Mantis/MySQL from scratch: users?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
dtgriscom
Posts: 9
Joined: 31 Jul 2005, 02:23
Location: Melrose, MA

Mantis/MySQL from scratch: users?

Post by dtgriscom »

I'm trying to install MySQL and Mantis 1.0.0rc1 under OS X 10.3, but I'm having trouble figuring out the different username/password combinations that are required. There are Unix usernames (which I use to login to my computer), MySQL usernames (which I use to connect to MySQL), and Mantis usernames which are (I think) independent of the other two types.

Example: my MySQL installation has two users defined: one "root" on host "localhost" and one "root" on host "Daniel-Griscoms-Powerbook.local". Both have the same password (say, "XXXX"), and both have all permissions. I can start up the mysql tool using the command line "mysql -u root -pXXXX"; it starts up just fine, and I can peruse tables and everything.

Now, when I try to get Mantis running by loading "mantis/admin/install.php", the page shown asks for "Username (for Database)" (with a password), and "Admin Username (to create Database)" (with a password). It's pretty clear that I should supply a valid MySQL username/password for the first username/password, so I always put in "root"/"XXXX". The second username/password pair is a mystery, though. I've tried putting nothing in them, putting "root"/"XXXX", putting "administrator"/"root", and a host of other possible values. Every time I'm greeted with an error message: "Attempting to connect to database as admin -BAD- Does administrative user have access to the database?"

So, my questions:

- Do Mantis installations ever deal with Unix usernames? (I'm assuming the answer is "no"...)

- Does Mantis have its own system of usernames, separate from MySQL's and Unix's? (I'm assuming the answer is "yes"...)

- What MySQL usernames should exist before I try to install Mantis?

- What's the difference between the "Username (for Database)" and "Admin Username (to create Database)" fields on the install.php page?


Thanks,
Dan

P.S. Another, perhaps related issue: the "Print SQL Queries instead of Writing to the Database" checkbox on install.php seems to have no effect: I never see SQL code, and Mantis always seems to try to connect to the database.
elviejo

Post by elviejo »

- Do Mantis installations ever deal with Unix usernames? (I'm assuming the answer is "no"...)
You are right Mantis doesn't need to deal with unix user names.
Except wen you try to upload attachments to your bugs.
- Does Mantis have its own system of usernames, separate from MySQL's and Unix's? (I'm assuming the answer is "yes"...)
Rgiht again you can create your own users inside manthis.
- What MySQL usernames should exist before I try to install Mantis?

This is the right question:

1) the first par of username/password that you are asked is:
Username (for Database)
Password (for Database)

this a user that can CONNECT to your Mysql server and to your Mantis DataBase (by default this database is called: bugtracking)

2) Most of the time you haven't created your Mantis Data Base (default: bugtracking) and there you need a MYSQL Administrative User. This user is a user that can create a Database in your Mysql server.

normally root/XXXX should work fine.
Guest

Post by Guest »

I've worked around this problem, finding two separate Mantis issues (which I'll be submitting):

1: The installation documentation isn't clear on just what MySQL user(s) are required for Mantis. As you suggested, the "Username (for Database)" is a MySQL user that can access the already-created Mantis database. If necessary, you can also specify an "Admin User (to create Database)" if the first user doesn't have enough privileges (the default is the same as the first user).

2: I'm running MySQL version 4.1.11. Versions from 4.1.1 on by default use a new password encryption format that isn't supported by Mantis (perhaps only when under php4). I had to manually change the MySQL password to the old format. Mantis should notice that the MySQL version is 4.1.1 or later and, when a connection fails, warn that this may be the root of the problem. It may also want to turn on the debug capabilities of the PHP/MySQL connection software; that's how I learned the details of the problem.


Thanks for the help,
Dan
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

The difference between the administrative user and the operating user is the database privileges that they have. The operating user requires ALTER, SELECT, INSERT, and UPDATE privileges. For installation, INDEX, CREATE, DELETE, and DROP privileges are also required by the administrative user. This was added to increase security in databases that allow user privileges, like MySQL.
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post by vboctor »

thraxisp has written an article on this:

MySQL Setup for use with Mantis
http://www.futureware.biz/blog/index.ph ... &tb=1&pb=1

Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect
AlanCE
Posts: 2
Joined: 07 Sep 2005, 19:10

Post by AlanCE »

I have this exact same problem but I can't get past it using the link provide dor Dan's somewhat sketchy comment about the password hashing in mysql 4.1.x.

I cannot get Mantis to install and the error given is too generic to help me figure out why. Is my admin user improperly permissioned? Is my admin user's password not working? Is it the password encryption format problem mentioned above?

Anyone who has successfully installed this on OS X 10.3 or 10.4 with mysql 4.1.x please lend a hand if you would. Thanks!
AlanCE
Posts: 2
Joined: 07 Sep 2005, 19:10

Post by AlanCE »

okay so the old_password thing isn't so hard to find with a bit of googling. sorry to have asked first and googled after. :)

Code: Select all

5a) Open /Applications/Utilities/Terminal.app
5b) Type mysql -u root -p and press enter. You will be prompted for your password, type it in and hit enter.
5c) You will have a prompt that looks like mysql> - At this prompt, do the following:
mysql> SET PASSWORD FOR
-> 'root'@'localhost' = OLD_PASSWORD('yourpassword');
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
Post Reply