I bought the “Build your own Database driven web site” book and followed the steps to install PHP, Apache and MySQL on my Ubuntu machine. PHP and Apache looks okay but I am receiving an error message when I am trying to execute the following command.
(I did the previous steps without any error message)
root@machine:/usr/local/mysql# bin/mysqladmin -u root status
bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@‘localhost’ (using password: NO)’
Here are the previous steps:
root@machine:/usr/local/mysql# groupadd mysql
root@machine:/usr/local/mysql# useradd -g mysql mysql
root@machine:/usr/local/mysql# chown -R mysql .
root@machine:/usr/local/mysql# chgrp -R mysql .
root@machine:/usr/local/mysql# scripts/mysql_install_db --user=mysql
root@machine:/usr/local/mysql# bin/mysqld_safe --user=mysql &
Any help would be appreciated…