HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   How To Forge guide on a LAMP server: MySQL error (http://www.howtoforge.com/forums/showthread.php?t=45940)

SimonBS 17th May 2010 20:50

How To Forge guide on a LAMP server: MySQL error
 
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

till 17th May 2010 21:32

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


All times are GMT +2. The time now is 11:35.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.