Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm just want to install lamp server + phpmyadmin normally in case of when setting up mysql i get this error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I don't know what this is.
I don't know how to run php code in ubuntu because it's my first deal with linux.

share|improve this question
What command did you use? How are you installing? What do you want to achieve? You need to give us much more information for us to help you. – Alvar Jan 7 '13 at 15:55
i'm just try more than one command and all of it didn't work – amr atef Jan 7 '13 at 16:16
and my achieve is wright & running php code with frameworks & cms – amr atef Jan 7 '13 at 16:17
@amratef Take the help of and give us complete log . – Raja Jan 7 '13 at 16:21
so i want to clean all of command and start again – amr atef Jan 7 '13 at 16:22
  1. Set a password for mysql:

    sudo dpkg-reconfigure mysql-server-5.x
  2. Now open the terminal and type:

    mysql -uroot -p

Give password and press Enter.

share|improve this answer
It is important to remember that the password must be after -p, without any space. – felipe.zkn Apr 15 '15 at 14:59
@felipe.zkn it is better to press enter after -p , so that password won't be displayed in the screen – Tachyons Apr 16 '15 at 9:27
Thanks for the warning! As I am on a secure place, I always use the direct form. – felipe.zkn Apr 16 '15 at 11:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.