Results 1 to 6 of 6
LAMP environment is installed in my redhat 5.4 server for an application software.I have kept the database at /var/lib/mysql/ecourtsdb and content of the application at /var/www/html.Application was accessible but after ...
- 03-16-2011 #1Just Joined!
- Join Date
- Mar 2009
- Location
- india
- Posts
- 52
Problem in MYSQL in LAMP environment
LAMP environment is installed in my redhat 5.4 server for an application software.I have kept the database at /var/lib/mysql/ecourtsdb and content of the application at /var/www/html.Application was accessible but after using this command
[root@localhost ~]# /usr/bin/mysqladmin -u root password redhat
[root@localhost ~]#
the application was showing in the web browser Access denied for user 'apache'@'localhost' (using password: NO)
and in the command promt its showing
[root@localhost ~]# /usr/bin/mysqladmin -u root password redhat
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[root@localhost ~]#/usr/bin/mysqladmin -u apache password redhat
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'apache'@'localhost' (using password: NO)'
I think apache can not access the mysql.thats why this is showing in the browser.
Need help.
- 03-16-2011 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Read the manual / use Google./usr/bin/mysqladmin -u root password redhat
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)
Code:mysqladmin --help -p, --password[=name] Password to use when connecting to server. If password is not given it's asked from the tty.
ORCode:mysqladmin -u root -p password
Code:mysqladmin -u root -p
- 03-17-2011 #3Just Joined!
- Join Date
- Mar 2009
- Location
- india
- Posts
- 52
this is showingCode:[root@localhost ~]# mysqladmin -u root -p redhat Enter password: mysqladmin: Unknown command: 'redhat'
i used the below mentioned command to change the password of root but was not working
Code:[root@localhost ~]# mysqladmin -u root -p redhat password nic123 Enter password: mysqladmin: Unknown command: 'redhat'
- 03-17-2011 #4Just Joined!
- Join Date
- Mar 2009
- Location
- india
- Posts
- 52
this command worked.Code:[root@localhost ~]# mysqladmin -u root -predhat password nic123 [root@localhost ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 24 Server version: 5.0.45 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
- 03-17-2011 #5Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Nowhere did you state you were trying to change the MySQL root password using the mysqladmin command.
Google: mysqladmin change password
First Link
Code:mysqladmin -u root -p'abc' password '123456'
- 03-18-2011 #6Just Joined!
- Join Date
- Mar 2009
- Location
- india
- Posts
- 52
before assigning password for mysql(mysqladmin -u root password newpassword )for the first time,mysql db was accessible from the web browser.As the problem occurred after assigning the password i was trying to change the password.
Although the problem is still there after changing the password.


Reply With Quote