Announcement

Collapse
No announcement yet.

How to reset MySQL root password in Linux/Unix system

Collapse

Ads on showthread pages

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to reset MySQL root password in Linux/Unix system

    WordPress Hosting on SSD Servers
    How to reset MySQL root password in Linux/Unix system

    1. Log on to your system as the Unix mysql user that the mysqld server runs as.
    2. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on the distribution, host name, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. Generally, the file name has an extension of .pid and begins with either mysqld or your system's host name.
    3. Create a text file and place the following statements in it. Replace the password with the password that you want to use.
    4. UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
    5. Save the file. For this example, the file will be named /home/me/mysql-init. The file contains the password, so it should not be saved where it can be read by other users.
    6. Start the MySQL server with the special --init-file option:
    7. shell > mysqld_safe --init-file=/home/me/mysql-init &
    8. The server executes the contents of the file named by the --init-file option at startup, changing each root account password.
    9. After the server has started successfully, delete /home/me/mysql-init.
    Last edited by admin; 02-18-2009, 06:53 AM.

  • #2
    ASP.Net Hosting starts @ $3.18/Mo.
    Re: How to reset MySQL root password in Linux/Unix system

    We can also refer to the steps provided at https://manage.accuwebhosting.com/kn...rom-WHM.htmlas its latest and easy way to reset the mysql root password.
    Last edited by Marc_AccuWebHosting; 05-14-2016, 10:40 AM.

    Comment

    Working...
    X
    Sign up for a News Letter Click here to sign up