Register for your free account! | Forgot your password?

You last visited: Today at 21:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



FreeBSD & MySql Password resets

Discussion on FreeBSD & MySql Password resets within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2011
Posts: 25
Received Thanks: 15
Smile FreeBSD & MySql Password resets

Hello everyone, this is a simple and quick guide to reset freebsd and mysql password and also check and optimize all mysql tables.

Probably most of you may know this already, but my target are those who are now giving their first steps in this matters, so, here it goes:

To reset mysql password, login in your machine and enter the following commands:

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

mysqld_safe --skip-grant-tables &

mysql -u root

use mysql

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

flush privileges;

quit

service mysql-server restart




Where is written desiredpassword, enter your desired password.
Where is written root, enter the user of the database, usually its root or db_manage.

__________________________________________________ __________________________________________________ __________

To save time, and repair and optimize all databases at once, enter the following commandb (i recommend using this command at least once, when you finish setting up your files, and BEFORE starting to work on them):

mysqlcheck -u root -p --auto-repair --check --optimize --all-databases

__________________________________________________ __________________________________________________ __________


To reset root password of FreeBSD, follow this steps:

1-Start FreeBSD

2-Press the space key [to stop the timer that boot freebsd]

3-Click on the number that identifies the option "Boot FreeBSD into single user mode", as seen on the image, this case is the number 4:




4-Press [ENTER] to boot as single user

5-After the message " When prompted Enter full pathname of shell or RETURN for /bin/sh: " press [ENTER]

6-To prevent future erros, use the following command to repair filesystem:
fsck -y [if it doesnt work, use fsck and enter y when asked]

7- After that, write this two commands:
mount -u /
mount -a


8-After it, enter this:
passwd

and write your desired password.

9- In the end, enter quit, and check if the password was modified.




Command without guide:

Reset password mysql

Repair and optimize all tables

Reset password root


Have fun
redryan is offline  
Thanks
5 Users
Old 07/18/2013, 21:59   #2
 
NaOiZ's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 738
Received Thanks: 499
allready pub
NaOiZ is offline  
Old 04/06/2015, 23:58   #3
 
Reigen's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 841
Received Thanks: 154
mysqld_safe --skip-grant-tables &

wenn ich das eingebe hängt er fest bis in alle Ewigkeit
Reigen is offline  
Old 04/07/2015, 08:52   #4
 
elite*gold: 5
Join Date: Mar 2013
Posts: 1,986
Received Thanks: 2,254
Quote:
Originally Posted by Reigen View Post
mysqld_safe --skip-grant-tables &

wenn ich das eingebe hängt er fest bis in alle Ewigkeit
PUTTY bzw. den SSH clienten nochmal starten und da die weiteren Schritte ausführen

Edit: btw u dont have to do the 6th step @resetting the root password
xGr33n is offline  
Thanks
3 Users
Old 04/09/2015, 00:07   #5
 
elite*gold: 0
Join Date: Jul 2011
Posts: 25
Received Thanks: 15
Wrote that when i was newbie in this theme
Ty for adding that info

As a kind of update:

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

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

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

Use
service mysql-server restart
redryan is offline  
Thanks
1 User
Old 04/09/2015, 00:19   #6
 
elite*gold: 5
Join Date: Mar 2013
Posts: 1,986
Received Thanks: 2,254
Quote:
Originally Posted by redryan View Post
Wrote that when i was newbie in this theme
Ty for adding that info

As a kind of update:

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

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

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

Use
service mysql-server restart


You can use
PHP Code:
service mysql-server stop 
instead of
PHP Code:
/usr/local/etc/rc.d/mysql-server stop 
___
PHP Code:
/usr/local/etc/rc.d/mysql-server 
is the same like:
PHP Code:
service mysql-server 
___
args:
Code:
start|stop|restart|rcvar|status|poll
xGr33n is offline  
Old 04/09/2015, 02:41   #7
 
Reigen's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 841
Received Thanks: 154
Habs mittlerweile selber raus gefunden. Trotzdem danke. Und sorry dass ich so ein alter Thema hervorgeholt hab, aber manche glauben noch an die SuFu
Reigen is offline  
Old 04/09/2015, 10:40   #8
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,015
Received Thanks: 498
Procedure: Reset FreeBSD root user password

Step # 1: Start FreeBSD server/workstation.

Step # 2: Press Enter key at boot loader.

At Welcome to FreeBSD! boot menu press spacebar key to pause default booting

Type number 4 key (type 4 number) to boot into single user mode



(click to enlarge)

Next you will see the following prompt from system:
When prompted Enter full pathname of shell or RETURN for /bin/sh:

Press Enter key to boot into a single user mode. Next, you will be immediately dropped into a single user mode without a root password.

You need to remount / (root) file system in read and write mode with mount command, type the following commands:
# mount -u /
# mount -a

Setup a new password with the passwd command for root user:
# passwd

Next type exit command to boot FreeBSD into multi-user mode environment:
# exit

OR You can just reboot the system:
# sync;sync
# reboot


Quelle:
BizepsSupportAccount is offline  
Old 04/09/2015, 11:14   #9
 
elite*gold: 5
Join Date: Mar 2013
Posts: 1,986
Received Thanks: 2,254
Quote:
Originally Posted by BizepsSupportAccount View Post
Procedure: Reset FreeBSD root user password

Step # 1: Start FreeBSD server/workstation.

Step # 2: Press Enter key at boot loader.

At Welcome to FreeBSD! boot menu press spacebar key to pause default booting

Type number 4 key (type 4 number) to boot into single user mode



(click to enlarge)

Next you will see the following prompt from system:
When prompted Enter full pathname of shell or RETURN for /bin/sh:

Press Enter key to boot into a single user mode. Next, you will be immediately dropped into a single user mode without a root password.

You need to remount / (root) file system in read and write mode with mount command, type the following commands:
# mount -u /
# mount -a

Setup a new password with the passwd command for root user:
# passwd

Next type exit command to boot FreeBSD into multi-user mode environment:
# exit

OR You can just reboot the system:
# sync;sync
# reboot


Quelle:

Den Sinn deines Postes muss ich nicht verstehen oder?
xGr33n is offline  
Old 04/12/2015, 00:37   #10
 
BizepsSupportAccount's Avatar
 
elite*gold: 0
Join Date: Dec 2014
Posts: 1,015
Received Thanks: 498
@Green, lass es einfach sein wirst es nichtmal verstehen können wenn ichs dir erkläre.

Wurden nun nicht oft genug diese Informationen rlsd?


#reported
BizepsSupportAccount is offline  
Old 04/12/2015, 02:34   #11
 
elite*gold: 0
Join Date: Mar 2015
Posts: 49
Received Thanks: 40
So basic skills... Google 1 minute.
Norri is offline  
Reply

Tags
freebsd, mysql, password reset


Similar Threads Similar Threads
Mysql Password
09/27/2010 - Metin2 Private Server - 2 Replies
Hi Leute, ich habe ein Problem schon seit Tagen was sich nicht behoben lässt :( Ich setz ein PW auf MYSQL aber man kann trotzdem mit jeden PW bzw garkein pw auf den mysql server connecten :( kann mir jemand helfen? woran es liegt...? Gruß
MySQL password
07/29/2009 - CO2 Private Server - 1 Replies
ok i checked every guide i found but none made sense to me can any1 make a video of how to do this my db was hacked+flushed so i wanna change it
mysql password
04/03/2009 - EO PServer Hosting - 1 Replies
I know how to add script to mysql but I was wondering if anyone could help me out I want to change the password to access the database but I need to know how I can get the encoded password after I change the password so My msgserver and so forth can access the db



All times are GMT +2. The time now is 21:45.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.