[TriLUG] mysql root pw with non-interactive lamp server install?

Tom Barron tpb at dyncloud.net
Mon Nov 2 21:54:02 EST 2009


Thanks Matt, I tried using the method from your link, it does work,
and it can be added to a non-interactive script (with lots of comments
about how I know it's a hack but I don't understand some of the black
magic that went before).

If anyone knows what  password was originally getting set by the
noninteractive tasksel installation, I'd still be interested in
finding out.  I looked at some of the preseed info for the dpkg stuff
that's getting invoked by tasksel, but I don't see anything relevant.

- Tom


On Mon, Nov 02, 2009 at 09:14:24PM -0500, Matt Pusateri wrote:
> http://www.howtoforge.com/reset-forgotten-mysql-root-password   <----  
> might work.
>
>
>
> On Nov 2, 2009, at 9:01 PM, Tom Barron wrote:
>
>> I'm doing an automated, non-interactive LAMP server install on ubuntu
>> karmic using the command:
>>
>>  % sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y install lamp- 
>> server^
>>
>> The '^' at the end effects a tasksel interaction and the
>> DEBIAN_FRONTEND setting runs the whole thing in batch without any  
>> popup
>> screens.
>>
>> Now the next things I want to do is:
>>
>>   1. set the mysql root server root password
>>   2. make a database for my web server
>>   3. set up a mysql admin user for that database
>>
>> I hit a snag at (1) since there already appears to be a mysql root
>> password set and I don't know what it is.  'mysql -u root' fails with
>>
>> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using  
>> password: NO)
>>
>> And 'mysql -u root -p' fails because I don't know the password that
>> was set.
>>
>> Anyone know the way out of this conundrum?
>>
>> Thanks,
>>
>> - Tom
>> --
>> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
>> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG FAQ  : http://www.trilug.org/wiki/Frequently_Asked_Questions



More information about the TriLUG mailing list