MySQL Password

Joined
Jan 27, 2012
Messages
8
Points
0
Hi,

I dont know what happened but the database root passwords seems to be changed.When I try logging to the database using mysql -u -root -p with the password it says

"" Access denied for user 'root'@'localhost' (using password: YES)""

Is there anyway I can see the passwords.

It would be great if I can get the password for all the users in the database specially the I would need the user to open the database "mysql"

Thanks in advance
 

Bob

Joined
Nov 4, 2007
Messages
2,400
Points
36
What version of Elastix are you running??

If it was Elastix 2.2, you would have set the password at install time....


Regards

Bob
 
Joined
Feb 28, 2008
Messages
5,737
Points
0
If you have elastix 2.X, execute:
cat /etc/elastix.conf
there you will see the password used during installation
 
Joined
Dec 3, 2007
Messages
8,069
Points
88
Hi.

Read Elastix Without Tears, all default password are there.

For MySQL : eLaStIx.2oo7

Regards
 
Joined
Jan 27, 2012
Messages
8
Points
0
Hi,

Well I tried that at first itself.It isn't working.Is there anyway we can reset the passwords?

Regards,

Faiz
 
Joined
Dec 3, 2007
Messages
8,069
Points
88
# mysql -u root -peLaStIx.2oo7
Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3089
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
It work! no?
 
Joined
Jan 27, 2012
Messages
8
Points
0
Nope,it isnt working...

This is the Output I am getting


"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"
 
Joined
Feb 28, 2008
Messages
5,737
Points
0
Are you sure that you are typing correctly the password?
Theer is a huge difference on: eLaStIx.2oo7 and eLaStIx.2007

Anyways, if you have copied it and doesn't work, you may erset the mysql password:

1) service mysqld stop
2) mysqld_safe --skip-grant-tables &
3) (hit the enter key)
4) mysql -u root
5) use mysql;
6) update user set password=PASSWORD("MYNEWPASSWORD") where User='root';
7) flush privileges;
8) quit
9) service mysqld restart
10) mysql -u root -p
11) Enter the password used on #6, on this case, it would be: MYNEWPASSOWRD
 
Joined
Jan 27, 2012
Messages
8
Points
0
Still didnt work....Please see below the output


********************************

[root@ELASTIX ~]# service mysqld stop
Stopping MySQL: [ OK ]
[root@ELASTIX ~]# mysqld_safe --skip-grant-tables &
[1] 1349
[root@ELASTIX ~]# Starting mysqld daemon with databases from /var/lib/mysql
mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update user set password=PASSWORD("Pass123") where User='root';
Query OK, 1 row affected (0.02 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
[root@ELASTIX ~]# service mysqld start
Starting MySQL: [ OK ]
[root@ELASTIX ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


**************************************************************
 
Joined
Feb 28, 2008
Messages
5,737
Points
0
:woohoo:
I have just tested and it works for me...


I assume taht you are using password as: Pass123 and NOT "Pass123"


Just in case... step #9 is restart and NOT start
 
Joined
Jan 27, 2012
Messages
8
Points
0
Yup...I restarted...Also used the password without quotes...still didnt work...


Apparantly since I got the table which stored the user details...that is "user" I just checked all attributes of the user root.What I found was the hostname for root was "%" and not local host.I think this was the issue.I changed the hostname to local host and EUREKAA...it worked...!!!:)

Thanks a million for your advise..You just saved me..!!!


Cheers

Faiz Abdu...
 

Members online

Forum statistics

Threads
31,024
Messages
131,180
Members
17,763
Latest member
handy
Top