-- Original Message --
From: jaya kumar
To: ilugc@ae.iitm.ac.in
Date: Thu, 23 Sep 2010 11:38:32 +0530
Subject: [Ilugc] running error in mysql
i installed mysql successfully
[ERROR 1045 (28000): Access denied for user
'root'@'localhost' (using
password: NO)]
where to modify the changes i selected password
of mysql is --- localhost
and
another error is
if i installed php successfully the error is i
could not save the php script
files as normal user
[Could not save the file
/var/www/html/local.php.
You do not have the permissions necessary to
save the file.
Please check that you typed the location
correctly and try again]
i installed fedora 13
can any one please solve this
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
now check the enclosed text file for changing root password in mysql.
s.mahalingam
"The person addressed in the email is the sole authorized recipient.
Should you receive it in error, immediately notify the sender of the
error and delete the e-mail. Any unauthorized dissemination or copying
of this e-mail (or any attachment to this e-mail) or the wrongful
disclosure of the information herein contained is prohibited.
Also note that this form of communication is not secure, it can be
intercepted, and may not necessarily be free of errors and viruses
in spite of reasonable efforts to secure this medium."
Solution
-
This situation arises only when you don't remember root password or entering
wrong password.
1. Stop MySql Server
As a first step, stop the mysql server using the following method:
# service mysql stop (or) # /etc/init.d/mysql stop
2. Please Add, --skip-grant-tables to mysqld-safe startup command
open the mysql startup script and add skip-grant-tables as shown below.
# vi /etc/rc.d/init.d/mysql
OLD LINE:-
---
$bindir/mysqld_Safe --datadir=$datadir --pid-file=$server_pid_file $other_args
>/dev/null 2>&1 &
NEW LINE:-
---
$bindir/mysqld_safe --skip-grant-tables --datadir=$datadir
-pid-file=$server_pid_file $other_args >/deve/null 2>&1 &
3.Start MySql Server with --skip-grant-tables
start the mysql server with skip-grant tables option which will allow anybody
to login to mysql with out entering a password
#service mysql start
starting MySQL [ OK ]
4. Login using MySQL Root user without entering password
#mysql -u root mysql
(since one has skipped the grant table this time when one try to login to MySQL
it will not ask for passwords)
5.To update mysql root password
USER MySQL;
UPDATE user SET Password=PASSWORD ('newpassword') WHERE user='root';
FLUSH PRIVILEGES;
---
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc