LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can't setup MySQL root password (https://www.linuxquestions.org/questions/linux-software-2/cant-setup-mysql-root-password-823405/)

DarkSlayer 08-01-2010 12:16 PM

can't setup MySQL root password
 
Following guide for CentOS 5.5 i've installed mysql server on my box.
Next step was setting up password for root user.
As you undestood, it failed. :(

output:
Code:

# rpm -qa | grep mysql
mysql-devel-5.0.77-4.el5_5.3
php-mysql-5.1.6-27.el5
mysql-5.0.77-4.el5_5.3
mysql-server-5.0.77-4.el5_5.3

Code:

# hostname
cent55.denhome.ge

Code:

# service mysqld status
mysqld (pid 2818) is running...

Code:

# netstat -tap | grep mysql
tcp        0      0 *:mysql                    *:*                        LIST


AND HERE ARE COMMANDS FOR PASSWORD CHANGE


Code:

# mysqladmin -u root password xxxxxx
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

# mysqladmin -h cent55.denhome.ge -u root password xxxxxx
mysqladmin: connect to server at 'cent55.denhome.ge' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

Code:

# mysqladmin ping
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

It's output from second try. During first try i didn't get error on first line command but did on second. In all tries after i got same errors on both lines

everything done under root
/etc/hosts is ok
iptables off

Please any suggestions

DarkSlayer 08-01-2010 01:04 PM

I think first try put my password somewhere.
because i can do next:

Code:

# mysql -u root -p
Enter password:    <=== Entering my password from first try and i'm in mysql shell


but i still can't login into phpmyadmin, same error:
Quote:

Error
#1045 - Access denied for user 'root'@'localhost' (using password: NO)


All times are GMT -5. The time now is 08:00 AM.