Oracle 5.0 Reference Manual page 2980

Table of Contents

Advertisement

FLUSH PRIVILEGES;
Write the
password for all
into memory so that it notices the password change.
4. Save the file. For this example, the file will be named C:\mysql-init.txt.
5. Open a console window to get to the command prompt: From the Start menu, select Run, then
enter
cmd
6. Start the MySQL server with the special
the option value is doubled):
C:\>
C:\mysql\bin\mysqld-nt --init-file=C:\\mysql-init.txt
If you installed MySQL to a location other than C:\mysql, adjust the command accordingly.
The server executes the contents of the file named by the
changing each
You can also add the
in the console window rather than in a log file.
If you installed MySQL using the MySQL Installation Wizard, you may need to specify a
defaults-file
C:\>
"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"
The appropriate
the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL
service in the list, right-click it, and choose the
field contains the
7. After the server has started successfully, delete C:\mysql-init.txt.
You should now be able to connect to the MySQL server as
MySQL server, then restart it in normal mode again. If you run the server as a service, start it from the
Windows Services window. If you start the server manually, use whatever command you normally use.
C.5.4.1.2. Resetting the Root Password: Unix Systems
On Unix, use the following procedure to reset the password for all MySQL
instructions assume that you will start the server so that it runs using the Unix login account that you
normally use for running the server. For example, if you run the server using the
you should log in as
this case you must start
without using
such as log files, and these may cause permission-related problems for future server startups. If that
happens, you will need to either change the ownership of the files to
1. Log on to your system as the Unix user that the
2. Locate the
depend on your distribution, host name, and configuration. Common locations are
mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. Generally, the file name has an
extension of
You can stop the MySQL server by sending a normal
using the path name of the
Administration-Related Issues
and
statements each on a single line. The
UPDATE
FLUSH
accounts, and the
root
as the command to be run.
account password.
root
--console
[240]
option:
--defaults-file="C:\\Program Files\\MySQL\\MySQL Server 5.0\\my.ini"
--init-file=C:\\mysql-init.txt
--defaults-file
--defaults-file
before using the instructions. Alternatively, you can log in as root, but in
mysql
with the
mysqld
[424], the server may create root-owned files in the data directory,
--user=mysql
file that contains the server's process ID. The exact location and name of this file
.pid
and begins with either
.pid
.pid
statement tells the server to reload the grant tables
FLUSH
--init-file
[404]
option to the command if you want server output to appear
[240]
setting can be found using the Services Manager: From
Properties
[240]
setting.
[424]
--user=mysql
mysqld
or your system's host name.
mysqld
kill
file in the following command:
2960
statement resets the
UPDATE
[409]
option (notice that the backslash in
[409]
--init-file
option. The
Path to executable
using the new password. Stop the
root
accounts. The
root
mysql
option. If you start the server as
or remove them.
mysql
server runs as (for example, mysql).
(not
-9) to the
kill
option at startup,
--
login account,
root
/var/lib/
process,
mysqld

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents