MySQL Setup, login first time as root and troublshooting

Presuming you are using Redhat or CentOS and yam command is available .

  1.  yum install mysql-server
  2. /etc/init.d/mysqld start
  3. mysqladmin -u root password ‘{password}’, if it gives issue try to reset default password in this manner
  4. /etc/init.d/mysqld stop
    mysqld_safe –skip-grant-tables &
    mysql -u root
    mysql> use mysql;
    mysql> update user set password=PASSWORD(“newrootpassword”) where User=’root’;
    mysql> flush privileges;
    mysql> quit
    /etc/init.d/mysqld stop
    /etc/init.d/mysqld start

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s