• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Little help with SQL Users password

Omegatcu

New Pleskian
So this is a little specific - so I hope somebody can help ;)

I installed PLESK for dev purposes only. So please keep in mind when i ask here for help this is NOT a production installation and PLESK is not accessible over the Internet!

I try to insert the user root with a specific password so my Projects from my old dev machine can be working without changing the credentials in every project.

The following query is whats giving me a headache and I'm sure somebody can tell me the solution.

Code:
UPDATE db_users SET passwd=PASSWORD('xxxx') where login LIKE 'root';

Now the root user exists (yes i added him via SQL because PLESK doesn't let me), but there is probbably something wrong how I set the password here - I'm sure its just another Function or some arguments the PASSWORD('xxxx') function needs.
 
What is the question?
What i have to use - this is my query:

Code:
UPDATE db_users SET passwd=PASSWORD('xxxx') where login LIKE 'root';

and this is what i get back:
Code:
Query OK, 0 rows affected, 1 warning (0.01 sec)
Rows matched: 1  Changed: 0  Warnings: 1


If i set any other value for passwd='xxxx' I get a success.
So whats wrong with my passwd=Password('xxxx') function call?
 
I am sorry, but I still do not understand the question. The statement is basically correct. You may want to set the database name in addition to db_users table, e.g. "UPDATE psa.db_users ...", but else the statement is valid. "0 rows" are affected, because the statement is only executed if the value of passwd changes. If you change the value and run the statement again, no rows will be affected, because there is no need to do the update. If there is no dataset named "root" in the "login" field, this will cause "0 rows" affected, too. I am not sure what this is all for, because even with an entry for "root", this does not enable "root" access.

If you are unsure whether the password is set, you could remove your "root" account and run a query like
GRANT all privileges ON psa.* to root@localhost IDENTIFIED BY 'xxxx';
But again, I don't get the idea why someone would want to do that.
 
thank you for your time - this solved my problem.

I get why its hard to understand - as i said its essentially only an installation for my development. With the change its possible to use all set up projects after I importet my database.
Thank you very much.
 
Back
Top