Jump to content

Recommended Posts

  • Premium

Hello again dear community,

I've seen in many hosters for doing reset mysql need money ,so I'll release a way how to do it easy by your self.

Here are the commands:

/usr/local/etc/rc.d/mysql-server stop

mysqld_safe --skip-grant-tables &

mysql -u root

use mysql

update user set password=PASSWORD('yourpassword') where user='root';

flush privileges;

quit

service mysql-server restart


 

Note:Replace the password that you want with the text yourpassword and if you're using another user replace root.

Hope I've helped you , if you have any problems please let me know.

Sincerely,

Crystal

  • Metin2 Dev 1
  • Love 4
Link to comment
https://metin2.dev/topic/13409-how-to-reset-change-dbs-password/
Share on other sites

  • Honorable Member

Just to sort it out better:

    # service mysql-server stop
    # mysqld_safe --skip-grant-tables &
    # mysql -u root
    mysql> use mysql;
    mysql> UPDATE user SET password=PASSWORD('yourpassword') WHERE user='root';
    mysql> FLUSH PRIVILEGES;
    mysql> quit
    # service mysql-server restart

  • Metin2 Dev 1
  • Love 4
  • Premium
12 hours ago, martysama0134 said:

Just to sort it out better:

 


    # service mysql-server stop
    # mysqld_safe --skip-grant-tables &
    # mysql -u root
    mysql> use mysql;
    mysql> UPDATE user SET password=PASSWORD('yourpassword') WHERE user='root';
    mysql> FLUSH PRIVILEGES;
    mysql> quit
    # service mysql-server restart

 

Thanks master :) 

  • Honorable Member
33 minutes ago, MichaelM said:
  Hide contents

FLUSH PRIVILEGES; 

It's not mandatory. You're not granting any kind of privilege to 'root'.

I usually needed to do so to get a total refresh of the passwords even on older sessions too.

It's not 100% necessary since we're going to restart mysql-server in the next step. (if that was your point)

  • Love 1
  • 3 years later...

I have a problem after i run this command ("mysql -u root")

it's show me this:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

How can i resolve this , can someone help me?

Edited by xgeorgewow
  • 2 years later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.