title: Initial authorization issue in mysql
body: <p>I tried multiple ways to install mySql and then access the database on a fresh installation. OS is RHEL 7. package used is mysql-5.7.7-0.3.rc.el7.x86_64.rpm-bundle.tar</p>
  
  <pre><code>installation process: 
  [root@host1 mysql]# rpm -ivh mysql-community-common-5.7.7-0.3.rc.el7.x86_64.rpm mysql-community-libs-5.7.7-0.3.rc.el7.x86_64.rpm mysql-community-client-5.7.7-0.3.rc.el7.x86_64.rpm mysql-community-server-5.7.7-0.3.rc.el7.x86_64.rpm
   Preparing...                          ################################# [100%]
   Updating / installing...
  1:mysql-community-common-5.7.7-0.3.################################# [ 25%]
  2:mysql-community-libs-5.7.7-0.3.rc################################# [ 50%]
  3:mysql-community-client-5.7.7-0.3.################################# [ 75%]
  4:mysql-community-server-5.7.7-0.3.################################# [100%]
  </code></pre>
  
  <p>then I start the server</p>
  
  <pre><code> systemctl start mysqld
  </code></pre>
  
  <p>After this I try to access the server with no password for root. I get error as:</p>
  
  <pre><code>[root@host1 mysql]# mysql -u root -p
  Enter password:
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>As I have not set any password, not very sure why this error comes. After this I tried various options and mone could help me.</p>
  
  <p>option 1 : asks to make a file and change password by using an init file. I tried using that and got output as:</p>
  
  <pre><code>    [root@host1 mysql]# mysqld_safe --init-file=/home/me/mysql-init &amp; [1]28469
      -bash: mysqld_safe: command not found
  </code></pre>
  
  <p>Option 2 : set the password using mysqladmin command</p>
  
  <pre><code>[root@host1 mysql]# /usr/bin/mysqladmin -u root password
  mysqladmin: connect to server at 'localhost' failed
  error: 'Access denied for user 'root'@'localhost' (using password: NO)'
  </code></pre>
  
  <p>Option 3 : using mysql_secure_installation</p>
  
  <pre><code>[root@host1 mysql]#  mysql_secure_installation
  
  Securing the MySQL server deployment.
  
  Enter password for root user:
  Error: Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>Option 4 : mysql -u root </p>
  
  <pre><code>[root@host1 mysql]# mysql -u root
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>and various others. Can you please suggest what can be issue behind this.</p>