HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   About database or database table to be used (http://www.howtoforge.com/forums/showthread.php?t=28016)

satimis 21st October 2008 16:38

About database or database table to be used
 
Hi folks,


Previously I ran;
Code:

mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost' IDENTIFIED BY 'oldpassword';

Now I want to change its password with:
Code:

mysql> UPDATE mail.user SET password=PASSWORD('newpassword') WHERE user="'mail_admin'@'localhost'";

But I can't figure out which database OR database table I have to use.

mysql> SHOW DATABASES;
Code:

+--------------------+
| Database          |
+--------------------+
| information_schema |
| mail              |
| mysql              |
+--------------------+
3 rows in set (0.16 sec)


If;
Code:

mysql> USE mail;
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

Code:

mysql> UPDATE mail.user SET password=PASSWORD('newpassword') WHERE user="'mail_admin'@'localhost'";
ERROR 1146 (42S02): Table 'mail.user' doesn't exist

Error popup. Please help. TIA


B.R.
satimis

marpada 21st October 2008 17:01

In mysql database (that's the system database).

Don't confuse the database passwords with the password of mail users :D
________
Anal blonde
________
No2 Vaporizer

satimis 21st October 2008 17:27

Quote:

Originally Posted by marpada (Post 151057)
In mysql database (that's the system database).

Don't confuse the database passwords with the password of mail users :D

Hi marpada,


What I need is ONLY to change the password. Nothing else. What shall I do? Thanks


satimis

marpada 21st October 2008 17:38

mysql> UPDATE mysql.user SET password=PASSWORD('newpassword') WHERE user="'mail_admin'@'localhost'";

or

mysql> USE mysql;
mysql> SET PASSWORD FOR 'mail_admin'@'localhost' = PASSWORD('newpassword');

and last

mysql> FLUSH PRIVILEGES;
________
Fix ps3
________
Lovely Wendie99

satimis 21st October 2008 19:02

Quote:

Originally Posted by marpada (Post 151063)
mysql> UPDATE mysql.user SET password=PASSWORD('newpassword') WHERE user="'mail_admin'@'localhost'";

or

mysql> USE mysql;
mysql> SET PASSWORD FOR 'mail_admin'@'localhost' = PASSWORD('newpassword');

and last

mysql> FLUSH PRIVILEGES;

Hi marpada,


I got password changed. Thanks


B.R.
satimis


All times are GMT +2. The time now is 14:18.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.