server running- mysqladmin error- Development Source Tree
OMG! I can't believe I solved it!

I started mysqld. However, client could not be started. When I gave the command 'mysql', the following error was shown:


  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  mysqlnew@dpaks:/usr/local/mysqlnew/bin$ ./mysql 


Why not create a user account in mysql?! Hence, I created a user account 'root' with 'root' as the password by writing the following in a text file named init-file and placing it where the user mysqlnew have access right. Note that they must be in different lines. Also, ensure that the server is not running.


  UPDATE mysql.user SET Password=PASSWORD('root') WHERE User='root';
  FLUSH PRIVILEGES;


I started the server by:


  ./mysqld --basedir=/usr/local/mysqlnew --datadir=/usr/local/mysqlnew/data --query_cache_type=1 --init-file=/home/mysqlnew/init-file &amp;


I then started the client by


  mysqlnew@dpaks:/usr/local/mysqlnew/bin$ ./mysql -u root -p
  Enter password:


Since I have now created a user account in mysql, I don't need to use --skip-grant-tables anymore for starting server.

However, its not yet finished!


  mysql> select 1+1;
  ERROR 1820 (HY000): You must SET PASSWORD before executing this statement


So, now I need to rectify this!


  mysql> SET PASSWORD = PASSWORD('root');
  Query OK, 0 rows affected (0.28 sec)


And that is it! :)