473,748 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do I reset user "root" password ?

My setup: Mac OS 10.4.4; mysql 4.x ... everything was installed and
working fine for some time. Today, I added drupal to my system and had
to create a new database in mysql -- now I am having some problems. I
will outline the problem, what I have tried to do to fix it, and what I
think caused it. Hope you can help and I am sorry this is long.

The problem: I can't login to mysql anymore with the "root" username
(which is where I have all my database files and tables stored for a
couple wordpress installs, the bbpress, and now the drupal). When I
execute in terminal:

/usr/local/mysql/bin/mysql -u root -p

And then enter my password, I get the following error:

ERROR 1045 (28000): Access denied for user 'root'@'localho st' (using
password: YES)

Attempted solutions: I assumed the password was changed somehow; I
wanted to reset the password for "root". I searched the internet, and
most suggest that I (in summary): kill the mysqld process, then either
find a .pid file for my server and do something with it (but I can't
get in the directory that houses the file) -or- enter mysqld
--skip-grant-tables --user=root after I've killed the mysqld command
again.

In both instances, I am getting permission errors and I can accomplish
neither.

I believe the .pid I need to chanage is housed in my
/usr/local/mysql/data folder, however, I can't get access to the
folder. The permissions are set to have "mysql" be the owner
(drwxrwx---).

I am not a unix wiz, have tried to chmod my way out of it, but no luck.
No matter what I try, I seem to be running into a permissions issue --
how can I reset permissions ?

Why I am being punished: I think this all might have started when I was
setting up the database for drupal, I think I did something to cause a
password change (I ran one set of commands without re-typing "user"
over the template).

I guess I just need a little hand holding.

Thank you!

Feb 13 '06 #1
0 2029

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1969
by: Speck | last post by:
Having a browse through Paul Dubois's book, MySQL (ISBN 0-7357-1212-3), I came across a section in which he describes how to reset the root password: 1. Shutdown the server by issuing a KILL under Unix or stopping the system service under Windows. 2. Restart the server with the --skip-grant-tables option which allows you to connect with no password and all privileges. 3. Reset the root password.
12
2859
by: Florian | last post by:
I've been stumbling over this, what I consider strange, behaviour. I installed mySQL on a Win2k machine and tried to change the root password, which didn't seem to work. I changed it this way: c:>mysql mysql> use mysql mysql> update user set password=PASSWORD('test') where user='root'; mysql> exit
2
2183
by: Gnarlodious | last post by:
This is stupid I know. In my fumbling around with mySQL and phpMyAdmin an internet intruder has gone and set a password unknown to me. Incredibly, I was only online for 3 hours when this happened and I spotted it on a log. I replaced the mySQL folder and updated the version but I still can't log in. Will one of you Gurus tell me how to just dump everything and start over?
1
3294
by: Adam Smith | last post by:
I have a new DB provided by my ISP don't know details of installation, setup etc. I can log in as anybody except root. mysql -h localhost -u mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 71 to server version: 4.0.16-log mysql -h localhost -u xxxxx
0
1884
by: ./Rob & | last post by:
Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it doesn't recognize me being logged in as root (via CURRENT_USER().) Here it is, line-by-line. Inline comments are denoted by '//'
1
4508
by: Andrea | last post by:
Hi, i've installed OCS Inventory NG for inventory and it has installed Mysql ver: mysql Ver 14.12 Distrib 5.0.18, for Win32 now i have to make a dump for save database but don't forget the root password. I've try to reset password with resetpassword.bat and also with this
7
161308
by: rajbala.3399 | last post by:
Hi , I want to download sql in my linux system........... # rpm -ivh MySQL-server-5.0.24a-0.glibc23.i386.rpm MySQL-cl ient-5.0.24a-0.glibc23.i386.rpm Preparing... ########################################### package MySQL-client-5.0.24a-0.glibc23 is already installed package MySQL-server-5.0.24a-0.glibc23 is already installed
1
24372
usafshah
by: usafshah | last post by:
Hi I'm using linux with mysql , when i type mysql in terminal it says like: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) i'm logged in as root but it works when i type mysql -u root -p and then type root password.
3
3446
by: randeeparora | last post by:
Guys, I desperately need some help here. I have lost my root password and I am unable to login in. Every time on the CL prompt I am asked for a password and I obviuosly can't get through. I also tried removing the MySQL, manually deleting the entire directory, reg entries and every time I re-install it asks for the same password again and again that I unfortunately don't remember. Even while configuring the MySQL server it keeps on referring...
0
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8237
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.