Problem resetting mysql root password
I have install 5.5.20 from mysql from the TAR file. that install was done from an admin user by the name of mysql. Using the mysql user, I have reached a point where I am unable to reset the root password. I have tried both method of resetting the password with no success. Here is what I did. (path omitted for brevity, but used in the commands)
shell>mysqld_safe --skip-grant-tables
shell>mysql
mysql>UPDATE mysql.user SET Password=PASSWORD('newPass')
-> WHERE User='root';
mysqlQuery OK, 0 rows affected (0.05 sec)
Rows matched: 0 Changed: 0 Warnings: 0
shell> mysqld_safe
shell> mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
created an init file that had ths
--------contents of minit-------
UPDATE mysql.user SET Password=PASSWORD("newPass") WHERE User='root';
FLUSH PRIVILEGES;
------------eof--------------
mysqld_safe --init-file=minit
killed mysqld
mysqld_safe
mysql -u root -p
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
By the way, I closely monitored the .err file and nothing unusual or pacular showed up there.
Anyone see what I did wrong? Anyone have other suggestions?
I have install 5.5.20 from mysql from the TAR file. that install was done from an admin user by the name of mysql. Using the mysql user, I have reached a point where I am unable to reset the root password. I have tried both method of resetting the password with no success. Here is what I did. (path omitted for brevity, but used in the commands)
shell>mysqld_safe --skip-grant-tables
shell>mysql
mysql>UPDATE mysql.user SET Password=PASSWORD('newPass')
-> WHERE User='root';
mysqlQuery OK, 0 rows affected (0.05 sec)
Rows matched: 0 Changed: 0 Warnings: 0
shell> mysqld_safe
shell> mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
created an init file that had ths
--------contents of minit-------
UPDATE mysql.user SET Password=PASSWORD("newPass") WHERE User='root';
FLUSH PRIVILEGES;
------------eof--------------
mysqld_safe --init-file=minit
killed mysqld
mysqld_safe
mysql -u root -p
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
By the way, I closely monitored the .err file and nothing unusual or pacular showed up there.
Anyone see what I did wrong? Anyone have other suggestions?
Similar Messages
-
10.3 MYSQL Root Password problem..
We are running OSX Server 10.3.9 with the built in MYSQL. Somehow the root password for MYSQL that was set is not working and I am locked out with a 1045 error. I need to know how I go about resetting the ROOT password for MYSQL. as I mentioned, I am using the MYSQL that comes with 10.3.9. I have looked online but the tutorials for resetting the passwords do not work on my version...
Thanks...
-- Dave HaussI think by default Solaris uses CRYPT_DEFAULT=__unix__ which limits you to 8 characters.
in order to have more than 8 usable characters in your passwd, then you must use "md5"
CRYPT_DEFAULT=md5
this is located in : /etc/security/policy.conf
I think you may want to change the password length in /etc/default/passwd
PASSLENGTH= (default=6) change it to something of your liking.
be sure to do a little more research on the exact steps, but this is what you are loking for. im just going by memory here. -
Trouble resetting forgotten MySQL root password
Hi there,
As the title suggests, I've forgotten my MySQL root password (and where I wrote it down) and have done endless searches (Google, MySQL site and forum, etc.), tried the resolutions but have not had any luck in resetting the password.
I tried the instructions on the MySQL site, but when I did that, I got this:
I've tried removing and restarting instances, as well as uninstalling MySQL, rebooting and then re-installing; still no success.
I'm running PHP (5.3.0) and MySQL (5.1.37) on Windows Vista.
I appreciate any help anyone can offer.
Thanks,
HeatherThe simplest way that I know to deal with this situation on Windows is to uninstall MySQL. Doing so should leave the databases intact in the data folder, although you might want to copy the contents of the data folder to a different location first.
Inside the data folder is another folder called mysql. Delete it, and then reinstall MySQL. You should then be able to set up a new root password. -
Hi All,
I've saved a 2.2.2 guest into a template, imported that into 3.0.2 and created a guest using it. VM starts up fine but can't remember the password for root (this was a once off where we changed the root password so a vendor could access it as root and forgot to change it back).
So I wanted to boot the guest from a System Rescue CD off the network via ftp after mounting the iso. Well, that didn't work out too well:
Error: Boot loader didn't return any data!
Tried changing the path to various folders in the mounted iso to no avail. Tried a Fedora 15 live cd as well but same problem. So I'm thinking unlike the Oracle Linux iso's, other distributions are not so straight forward when trying to boot from them off the network (http/ftp etc).
Is there a way to boot a PVM guest off the network to iso's other than Oracle Linux? Or perhaps another way to reset the root password for this guest?
Thanks.831583 wrote:
Is there a way to boot a PVM guest off the network to iso's other than Oracle Linux? Or perhaps another way to reset the root password for this guest?You can't boot any PVM guest from an ISO file. You can however login to Dom0, and boot the guest using xm create -c /path/to/vm.cfg -- this will throw up the GRUB menu so you can add the "single" kernel boot parameter and change the root password in single-user mode.
Alternatively, you could boot from a Network Location using the kernel and ramdisk options. Just depends on which distribution you're using. -
How do you reset the root password in Mountain Lion?
After install of Mountain Lion on my old iMac, I could not enter administrator, no password would work, Apple support helped me go through terminal to reset root password and root as administrator . I then was able to reset myself as administrator with a new pasword. I used that paassword a few times now it wont accept it again. I dont remember all the steps to reset the root password and recover from this situation.. Can anyone help? Is this a bug in Mountain Lion?
I'm having similar issues but other concerns
1. Can't go into recovery mode since its protected by firmware password, which I don't have. All option keys sequences go into the same firmware padlock, which I don't have the apparent pin.
2. In terminal mode it didn't happen to recognize that unix command. Also since I'm just on guest would that reset for the admin or possibly the guest acct?
3. I've done the DIMM pulls and even though older model, 2011, it didn't appear to a reset for the firmware password.
Any other options?? -
Reset lost root password and now have read only filesystem
Hello,
I have recently had to reset a locked root password by booting from cdrom, mounting the first boot disk, editing the shadow file to remove root's password and rebooting the system.
The system has booted OK but, I now have a read only filesystem - everything in / cannot be edited, passwd doesnt work etc.
df -k shows the root (/) filesystem has been mounted on the physical disk I edited:
Filesystem kbytes used avail capacity Mounted on
/pci@83,4000/FJSV,ulsa@2,1/disk@0,0:a 10085836 185862 9799116 2% /
but in the vfstab it still references the disksuite metadevice:
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
/dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no -
So, can I simply boot from CDROM again, amend the vfstab to be /dev/dsk/c0t0d0s0 (instead of /dev/md/dsk/d03) and reboot?
Any help with this is appreciated!
Thanks,
Emmadf -k should have shown root mounted on md0
e.g. on my machine
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 8260691 4366317 3811768 54% /
what does /etc/system show for rootdev?
# grep rootdev /etc/system
* rootdev: Set the root device. This should be a fully
* rootdev:/sbus@1,f8000000/esp@0,800000/sd@3,0:a
rootdev:/pseudo/md@0:0,0,blk
Remember if this is a mirrored drive, when you boot from CD you may need to mount both sides of the mirror and make changes on both sides- otherwise the replication may not goes as expected.
Actually, I have run into problems with the modifying one side of a mirror this way. In the past Sun tech support would recommend that I break the mirror and then rebuild it once the system is up and running. So in your case you may want to boot from CD, mount the 1st disk slice, edit /etc/vfstab AND /etc/system, boot into the OS and use the various meta commands to delete and rebuild the mirror- or at least maybe to drop and reattach the 2nd 1/2 of the mirror. -
% in mysql root password prevents jsp page to connect
my root password to connect to the mysql database is ab12% and when i ran my jsp page which worked in my windows machine with the password asdb34, on a linux machine with mysql password ab12% its showing urlencoder error and the error pointed to the connection string telling unknow escape sequence %.
can u please help me to recover this problem other than changing the password?
how shld i rewrite my connection string
my current string is
CONNECTIONSTRING=jdbc:mysql://127.0.0.1,:3306/sitedb?user=root&password=ab12%Try the Oracle JDBC forum - http://forums.oracle.com/forums/forum.jspa?forumID=99&start=0
or Sun's JDBC forum:
http://forum.java.sun.com/index.jspa?tab=java -
Hi Guys,
I'm rather new to all this PHP and MYSQL stuff, so please bear with me. I have downloaded and installed a copy of MYSQL and PHP, and am now trying to change tohe root password, but I keep getting an error message.
I log in to MYSQL with:
/usr/local/mysql/bin/mysql
from there I type:
UPDATE mysql.user SET Password = PASSWORD('****') WHERE User = 'root';
but I keep getting an error message of:
ERROR 1142 (42000): UPDATE command denied to user ''@'localhost' for table 'user'
what have I got wrong?I've tried to follow the above advice.
I've completely deleted my MySQl on OS X Server 10.4.7 and reinstalled using the lastest package "mysql-standard-5.0.24a-osx10.4-powerpc.dmg".
I just cannot get mysql to work properly, to set my root password.
See my first attempts with Terminal below (No.1)...
MySQL Adminsitaror and CoCoa SQL connecs with no username or password.
I've also tried to follow marcs advice at http://www.entropy.ch/software/macosx/mysql/ but to no avail.
See my second attemps with Terminal below (No.2)...
If I can crack how to reinstall and setup MySQL on OS X Server 10.4.7 then I'll have a good Disaster Recovery Plan, I hope you can help, thanks.
No.1
Last login: Fri Sep 22 17:26:02 on ttyp1
Welcome to Darwin!
Server:~ admin$
Server:~ admin$ sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables -u root &
[1] 1014
Server:~ admin$ A mysqld process already exists
[1]+ Exit 1 sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables -u root
Server:~ admin$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
Stopping MySQL database server
Server:~ admin$ sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables -u root &
[1] 1066
Server:~ admin$ Starting mysqld daemon with databases from /usr/local/mysql/data
Server:~ admin$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Starting MySQL database server
Server:~ admin$ /usr/local/mysql/bin/mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (13)
Server:~ admin$ /usr/local/mysql-standard-5.0.24a-osx10.4-powerpc/bin/mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (13)
Server:~ admin$
No.2
Last login: Fri Sep 22 17:26:12 on ttyp1
Welcome to Darwin!
Server:~ admin$ sudo find /usr/local/mysql/data -type f -exec rm {} ';'
Password:
Server:~ admin$
Server:~ admin$ sudo hostname 127.0.0.1
Server:~ admin$ cd /usr/local/mysql
Server:/usr/local/mysql admin$ sudo ./scripts/mysqlinstalldb
Installing all prepared tables
060922 17:35:30 [Warning] Setting lowercase_tablenames=2 because file system for /usr/local/mysql-standard-5.0.24a-osx10.4-powerpc/data/ is case insensitive
060922 17:35:30 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=127-bin' to avoid this problem.
Fill help tables
060922 17:35:31 [Warning] Setting lowercase_tablenames=2 because file system for /usr/local/mysql-standard-5.0.24a-osx10.4-powerpc/data/ is case insensitive
060922 17:35:31 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=127-bin' to avoid this problem.
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h 127.0.0.1 password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Server:/usr/local/mysql admin$ sudo chown -R mysql data/
Server:/usr/local/mysql admin$ /usr/local/mysql/bin/mysqladmin -u root password operate
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (13)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
Server:/usr/local/mysql admin$ -
Mysql: resetting the root password
Hello all!
Going on Day 4 here and definitely at the end of the rope!
When trying to connect to my databases (which 2 months ago
worked fine)
I received the following error by DW "An unidentified error
has
occured". After numerous hours troubleshooting, I have come
to the
conclusion the passwords in Mysql must have got damaged.
--tried to clear the passwords in Mysql by Mysql A.4.1
Reference Manual
instructions of making a new word file with the text:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');
and then went to the bin directory of Mysql and typed:
mysqld-nt --init-file=c:\mysql-init.txt (name of file)
Of course Nothing happened concerning the "unidentified
error" after
re-starting Mysql.
Does anyone know another way to reset the passwords?
And do you know why they would become damaged for no reason?
The Mysql,
php, phpMyAdmin, Dw intergration just seems so delicate and
fragile--it
seems some clitch comes along after say 10 hours of work
everytime.
This is not the *first* crash I have had with this set up.
Why would
passwords work one day and not the next--it's not like I'm
racing my
computer on Friday nights!
Many thanks,
Star2To David Powers:
THANK YOU SO MUCH FOR YOUR HELP. Sorry it took so long for me
to
reply...I started looking at the documentation and lost track
of time
and then had to go to work.
The versions I'm using are: Mysql version is 4.1.1 and PHP is
5.0.
So let me see if I have this straight:
--since I'm using a version of Mysql that is higher than 4.1,
I need to
download the MySQLI extension
Should I upgrade the MySQL to 5.0 first? I was thinking about
upgrading
to DW8. Would it be better to upgrade to MySQL 5.0 with DW8?
I want to just download the MySQLI extension, connections
work again,
and then upgrade to DW8 and then that's it-no problem. That
is probably
wishful thinking!!
Again, thank you so much! This is not the first time you have
talked me
down from the "Day 4 Ledge"...I definitely would have quit
this long ago
with this group's help and your help.
Many thanks,
Star2
P.S. I'll try to post the MySQLI downloading result here if I
can...if I
don't beat my computer to death in a "computer rage" first.
> Star2 wrote:
>
>> I received the following error by DW "An
unidentified error has
>> occured". After numerous hours troubleshooting, I
have come to the
>> conclusion the passwords in Mysql must have got
damaged.
>
>
> The problem is almost certainly to do with the versions
of MySQL and
> PHP. Since MySQL 4.1, you either need to use the MySQLI
extension to
> connect to MySQL, or you need to set the password using
OLD_PASSWORD().
>
>
http://dev.mysql.com/doc/refman/5.0/en/old-client.html
>
>> Does anyone know another way to reset the passwords?
>
>
>
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
>
>> And do you know why they would become damaged for no
reason? The
>> Mysql, php, phpMyAdmin, Dw intergration just seems
so delicate and
>> fragile--it seems some clitch comes along after say
10 hours of work
>> everytime.
>
>
> I've been running PHP, MySQL and DW daily for several
years now. If
> correctly set up, they work in perfect harmony.
> -
How to create/reset root password on OSX Yosemite
Hi,
I am currently a standard user on a late 2008 Macbook Pro. There are two users on my computer, mine and another admin account. I do not know the password to the admin account. Before I upgraded to OSX Yosemite I had created a root user password in SUM using the command "passwd". After I upgraded (I reset my computer) I was back at square one, me as a standard user and another admin account that I didn't know the password. After I upgraded the “passwd” command didn’t work.
I tried to obtain the root password using multiple SUM commands like, "rm /var/db/ .AppleSetupDone" which didn't work because it said that it couldn't find the file. Then I tried to use the command, “/System/Library/LaunchDaemons/com.apple.opendirectoryd.plist” and then entering “passwd”. However that didn’t work. (Everything I did was after I mounted the drive.)
So I was wondering if anyone on the forums knew of a way for a standard user to reset the root password without the knowledge of the admin password.
Thanks in advance.Hey SamuraiPizzzaCat,
Thanks for the question. After reviewing your post, it sounds like you want to use automatic login. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
OS X Yosemite: Login Options pane of Users & Groups preferences
Automatic login
Choose Off to require users to log in whenever the Mac restarts.
To automatically log in a particular user when the Mac restarts, choose the user’s account name and enter his or her password.
Thanks for using Apple Support Communities.
Have a nice day,
Mario -
[Solved] Reset root password
Hi folx
I need to reset the root password. I tried going into GRUB and appending the relevant line with:
(1.) single
(2.) 1
(3.) single init=/bin/bash
Result:
(1.) asked for root password during boot
(2.) asked for root password during boot
(3.) didn't get that far as it went into kernel panic
I downloaded Ubuntu 8.10 desktop to use as a live CD, but that didn't work as the CD just dumped me into an initramfs session.
How am I supposed to reset my root password?
Thank you, wickyd.
Last edited by wickyd (2009-03-19 07:38:14)this has all been discussed before - ad nauseatum
1) boot up with _any_ live cd
2) mount your root filesystem as - say - /mnt/fs
3) vi /mnt/fs/etc/passwd
change the first line to:
root::0:0:root:/root:/bin/bash
4) unmount /mnt/fs and reboot
5) you can now log in as 'root' with no passwd
6) pwconv && passwd (now set new password)
<edit>
With all due respect - chroot is _not_ the way to go.
In order to actually _set_ a new password, you have to run the same kind of
authorization as in your present system - it may be different for different distros.
</edit>
Last edited by perbh (2009-03-18 16:49:01) -
Hi
I have a Sun Ultra5 Server running solaris 2.6. I have lost the root password and would like to reset it. Does anyone know how I can reset the root password? I have a bootable Solaris software CD.
Thanks
RichardHi Richard,
It is good to know that you have a bootable cd.
Well to start with don't if you have lost the root password.
We can reset the password.
Way to reset the password.
1. boot the system to come in ok prompt.
2. then boot from cdrom in single user mode.
3. after booting from the cdrom mount the file system (root file system c0t0d0s0) which contains the etc\shadow,password ... files.
4. then vi the shadow file and remove the password.
5. save and come out.
6. reboot the system. you login as root then you will be promped as to give new password.
7. So here give the new password.
Warm Regards
Sridhar M
Hi
I have a Sun Ultra5 Server running solaris 2.6. I have
lost the root password and would like to reset it.
Does anyone know how I can reset the root password? I
have a bootable Solaris software CD.
Thanks
Richard -
Reset root password of OVS Server
Hi Guru,
I have install the OVS Server 3 and now am unable to connect using the root password.. I need to reset the password so that I can login to the OVS Server.
Can you please help to provide steps to perform this
Note: I have already tried to boot OVS Server into the single user mode but it’s not working.
Thank you in advance
Regards,
JigneshOVM server is just linux with the Xen hypervisor so it should reset fairly easily. Did you follow steps like the ones below, this is for RHEL which is the upstream Distro for the OVM Server kernel.
1. Boot the system and when you see the following message "Press any key to enter the menu", press any key. (You will see the list of available kernel versions.)
2. Press e in order to edit commands before booting.
3. Highlight the list item with vmlinuz in it by using the arrow keys and press e.
4. Now type single or init 1 at the end of the line.
5. Then press enter and b to boot the system with the new argument. (The system will boot into single user mode and you will see bash prompt)
Now it's time to change the password:
6. Type passwd
Examples:
### Shell Commands ###
passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
7. Type reboot to restart the system.
sourece: 7 easy steps to reset forgotten root password on CentOS/Red Hat | Javalobby
Good luck, Russell -
Reset root password vCenter 6 Aappliance
Hi all,
Due to misconfigured keyboard layout, I used a wrong password for the initial installation of vCenter 6 Appliance.
Is there a chance to reset the root password? Login to Web Client with SSO [email protected] is possible.
I tried the thing with single user mode in GRUB, but there, I need also the GRUB password which is also the root password(?).
Any advice?
Thank you!
PeterI already did the same with the VMware Support, but I´m not sure if I remind every step...
Boot the Appliance VM with a Live-CD (Ubuntu,SUSE,...)
Change/set the root password to "vmware"
Mount the system disk from your vCenter appliance
In the /etc/shadow file of the live-system copy the line with the "root" entry to the /etc/shadow file of the appliance disk
Delete the old "root" line in the file
Boot the appliance an login with the "vmware" password -
Is there a way to reset the root password on a UCS C220 VMware ESXi Hypervisor? The instructions I found online apply to a C200 and they dont appear to work for this.
For those wondering we acquired the hardware through an acquisition and our server team had no use for it so I am going to try to create a lab for our group.
ThanksAlex,
If what you want to do is to change the password of CIMC, then you need to restart the server, press F8 when you see the Cisco logo and then configure a new password (reason why you need to keep your servers away from ppl that can reboot your server and have access to it).
If by any chance you are looking to have the ESXi password changed, then you need to re-install the OS:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1317898
"Reinstalling the ESXi host is the only supported way to reset a password on ESXi. Any other method may lead to a host failure or an unsupported configuration due to the complex nature of the ESXi architecture. ESXi does not have a service console and as such traditional Linux methods of resetting a password, such as single-user mode do not apply. "
HTH,
-Kenny
Maybe you are looking for
-
Hi All, Could someone suggest me is there a report which shows the issues against stocks in the inventory which will help us plan Min/Max.Other thing can anyone tell me how to upload budgets in inv and is there any option of putting in both quantity
-
Transfer postings to PCA.
Hi all In profit center accounting, I'm facing a problem with transfer of payables and receivables. I've run the steps F.5D and 1KEK to transfer the data, but there are 4 items related to a sales order which are balancing to zero in GL but not in PCA
-
Trouble exporting Flash from FCP, and, no MPEG-2 option?
Hello. I'm trying to export a short 5 minute video from FCP. There doesn't seem to be an option for MPEG 2 anymore. Am I missing it? Second, when I export with the Flash (FLV) setting FCP "stops responding" every time. Any idea what's up with that an
-
Dear All, I have so many scheduling agreements of previous months with respective info records for which "GR based IV" indicator is not ticked & for vendor also its not ticked & the requirement is to get the indicator :GR based IV" ticked for all t
-
I have a Max OSx desktop and the other day Adobe Flash Player 11.2.202.235 appeared on my screen so not knowing any better, I downloaded it with no luck. After that, I went back to playing my website game- Squircircle jigsaw puzzle and a tiny box app