Skip to main content

password help

mySQL password root password reset :

Log on to your system as the Unix user that the mysqld server runs as or as root / administrator


Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your 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. in freebsd it is usually located at /var/db/mysql/servername.pid . 


You can also obtain the mysql process id (pid) by using the following command - ps - aux | grep mysql


Issue command :


shell > kill `cat /var/db/mysql/servername.pid`  or
shell # kill mysql-pid

Create a text file containing the following statements. Replace the password with the password that you want to use.
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;
Write the UPDATE and FLUSH statements each on a single line. The UPDATE statement resets the password for all root accounts, and the FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change.
Save the file. For this example, the file will be named /home/me/myinit. The file contains the password, so it should not be saved where it can be read by other users. If you are not logged in as mysql (the user the server runs as), make sure that the file has permissions that permit mysql to read it.
Start the MySQL server with the special --init-file option:
shell> mysqld_safe --init-file=/home/me/myinit &
The server executes the contents of the file named by the --init-file option at startup, changing each root account password.
alternatively :
You can start mysql
shell > mysqld_Safe --without-grant-tables &


login to mysql
shell > mysql
mysql > password

Comments

Popular posts from this blog

Excerpts from a Messaging & Collaboration White Paper

Current Trends – Cloud (Hosted) Messaging Solutions Email is only one of a growing portfolio of services in what is routinely referred to as Unified Communication (UC) infrastructure. From the hardware and infrastructure point of view, this often means the integration of network systems for telephone (landlines), internet (data link), video (conferencing, cable etc.) and cellular communication. From the services point of view, the usual term is Unified Messaging (UM) – which encompasses email, voice mail, video mail, instant messaging, and SMS messaging. Other components of UM include social networking sites and tools such as RSS, Facebook, Twitter, Google Voice, Google Wave [1] , document management, project management and a growing catalog of innovative solutions. Messaging platforms are evolving and as vendors make these capabilities available in their free consumer versions, business user expectations are also being shaped by their experiences on thes...

iOS Developer Program License Agreement

LEASE READ THE FOLLOWING LICENSE AGREEMENT TERMS AND CONDITIONS CAREFULLY BEFORE DOWNLOADING OR USING THE APPLE SOFTWARE. THESE TERMS AND CONDITIONS CONSTITUTE A LEGAL AGREEMENT BETWEEN YOU AND APPLE. iOS Developer Program License Agreement Purpose You would like to use the Apple Software (as defined below) to develop one or more Applications (as defined below) for Apple-branded products running the iOS. Apple is willing to grant You a limited license to use the Apple Software to develop and test Your Applications on the terms and conditions set forth in this Agreement. Applications developed under this Agreement can be distributed in two ways: (1) through the App Store, if selected by Apple, and (2) on a limited basis for use on Registered Devices (as defined below). Applications that meet Apple's Documentation and Program Requirements may be submitted for consideration by Apple for distribution via the App Store. If submitted by You and selected by Apple, Your Appli...

Obama : The Country We Believe In

A speech by The President of the United States of America, Barack Obama, on April 13, 2011 at Goerge Washington University... Good afternoon.  It’s great to be back at GW.  I want you to know that one of the reasons I kept the government open was so I could be here today with all of you.  I wanted to make sure you had one more excuse to skip class.  You’re welcome.