How To Forge guide on a LAMP server: MySQL error

Discussion in 'Server Operation' started by SimonBS, May 17, 2010.

  1. SimonBS

    SimonBS New Member

    Hi.

    I've just followed the How To Forge guide: How To Set Up A Ubuntu/Debian LAMP Server. It's a great and easy guide.

    But I'm experiencing a problem. First, I installed Apache and PHP5 and the phpinfo(); worked fine. I have another server running in the house, so I changed the port in the config to 8000 and in the router I opened for port 8000 and made it 'redirect' to port 80. It still works - I'm just explaining the whole process.

    Now I installed MySQL and during the installation it asked me to set a password. I set the same password, as Ubuntus root user, and as the user that I'm logged in as. I'm using the same password EVERYWHERE on this machine for easier rembering.

    But when trying to run these commands, I get an error.

    Code:
    mysql -u root
    mysql> USE mysql;
    mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';
    mysql> FLUSH PRIVILEGES;
    The error I get is:

    Code:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    I continued and installed PHPMyAdmin which works fine. I do not know my login information, but I guess it's because I have not set it, since I could not run the MySQL commands? If that's not the case, can anyone please tell me when I made this account?

    Else, can anyone tell me why I'm getting that error?

    I'm familiar with PHPMyAdmin, MySQL and PHP. I've programmed it for many years, but this is the first time, I'm setting up my own Linux webserver. Until then I've been using a webhotel, Surftown.

    As mentioned, I did not create a user during any of the installation, but I have set several passwords - all set to the same.

    Thanks in advance and sorry for bad english.

    Simon B. Støvring
    Denmark
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    On your system there is already a password set for the root user. So you can skip this step.
     
: error, lamp, mysql, root, user

Share This Page