[PLUG] Securing Initial Accounts in MySQL

Jason R. Martin nsxfreddy at gmail.com
Sat Dec 3 18:18:10 UTC 2005


On 12/2/05, Rich Shepard <rshepard at appl-ecosys.com> wrote:
>    Page 125 of the mysql-4.1 manual (section 2.9.3: Securing Initial Accounts)
> tells me to start the database interface, then use
>
> mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('<password>');
> mysql> SET PASSWORD FOR ''@'<hostname>' = PASSWORD('<password>');
>
> which is what I did.
>
>    Then, running the SugarCRM setup wizard I get to the last page where all
> the options and configuation choices have been entered and the application is
> supposed to create the database, my user account, and start running. Well, it
> can't even get up on its hands and knees and crawl, never mind run.
>
>    What I see in the dialog box is this:
>
> Step 6: Perform Setup   SugarCRM
> Creating the config file...done
>
> Installation is proceeding... the output will appear below once it is
> complete. Please wait.
> Creating the database sugarcrm on localhost...done
> Creating the db username and password...Creating the db username and password
> for localhost...done
>
> Unable to select database: Access denied for user ''@'localhost' to database
> 'sugarcrm'
>
>    Now, simple-minded as I am, when I set the mysql password, I thought I was
> setting it for a server, not a user. Yet, the sugarcrm message tells me that
> there's a user called ''@'localhost'.

You can define different passwords (and privileges) for the same
username based on the host it logs in from, but you still need to have
a username.  '%' is the host wildcard.  What you probably want
(thought I don't know anything about sugarCRM) is something like user
sugarcrm and host localhost, i.e. 'sugarcrm'@'localhost', though if it
doesn't matter what system the web application is running on you could
simplify things with 'sugarcrm'@'%'.

>    Is this a mysql error on my part? In the sugarCRM setup, I defined myself
> as the authorized user, and the username 'mysql' as the db admin.

You want to create a user for the *application* and grant it the
permissions the application needs.  You can then define yourself as an
admin.  Make sure you change the password for 'root' as well :-)

>    With hope that this is the last hurdle to overcome, I ask for another clue.

Hopefully that's a clue.  But MySQL is getting hazy in my gray matter...

Jason



More information about the PLUG mailing list