I am trying to maintain a MySQL db which is required for business usage. I recently ran into a problem where one of our programs would blow up with an SQL error; taking a look at the error message, the program description, and the database in question reveals that the program is trying to update some rows of the table without having the correct privileges for the user/password identification required to run the program.

I have looked at the only MySQL text I currently have on hand. It mentions the grant and revoke statements, but from what I can tell, 'grant' creates a new user. I need to change the permissions on an old user, and what little I've been able to find on the topic does not indicate how this would be done. Does anyone have any suggestions to offer?

Thank you for your consideration.

Recommended Answers

All 3 Replies

cant you use a GUI tool like phpmyadmin?

Remote machine. At the moment, my only access is through putty.

hmm so no GUI or web based tools then.

Here is code for changing the root password. I believe you could modify the syntax to change permissions.

mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';
mysql> FLUSH PRIVILEGES;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.