1 / 2

How to Restore a User's Database Access

Restoring a user's access to database is made possible by following certain steps that cater to this purpose. When one follows the steps that are meant for it then it becomes easy to restore the database access of a user.

htshosting
Download Presentation

How to Restore a User's Database Access

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. When the user of a database loses access to databases, the user’s grants to the database can be restored with the aid of the restoregrants utility. Restoregrants Script The restoregrants script can be used to restore the user’s access to database. For this purpose it is required to run one of the below-mentioned commands from the command line. 1st command /usr/local/cpanel/bin/restoregrants --cpuser=$cpuser --db=$type -- dbuser=$dbuser 2nd command /usr/local/cpanel/bin/restoregrants --cpuser=$cpuser --db=$type --all The variables used in the command, as well as what these represent, are listed below. $cpuser - It represents the cPanel username that lost access to its databases. $type– It represents the database type. Mysql for MySQL. Pg for PostgreSQL. $dbuser – It represents the database user, whose privileges need to be restored. If the dbuser flag is used, then the database user is represented by $dbuser. If the all flag is used, then the script acts to restore grants for all the users of the database that belong to the cPanel account. Update the Password of the cPanel User In certain rare cases, the restoregrants script might fail to restore access to the database. In such a situation, where the script fails, the cPanel account’s password can be reset to restore grants by either the cPanel user or the WHM user, who owns the account. A cPanel user needs to follow the below-mentioned steps for restoring grants.

  2. •Navigate to the Password & Security interface of cPanel. •Select the option, Allow MySQL password change. •Enter the old password in the text box for Old Password. •Enter a new password in the text boxes, New Password and New Password (again). •Click Change your password now. The server administrator or a reseller needs to follow the below-mentioned steps for restoring grants. •Navigate to the List Accounts interface of WHM. •Click the + link that is next to the appropriate account. •Select Sync MySQL password with account password. •Enter the new password in the text box, Change Password. •Click Change. This concludes the process. For the uninitiated, cPanel refers to a control panel that is meant for web hosting. It has been developed by cPanel LLC. It provides automation tools along with a graphical interface to a website owner for simplifying the process of hosting a website. In this context, web hosting is a service provided by various web hosting companies that exist in different parts of the world. It is meant for rendering websites accessible over the Internet. In it, web server space is offered along with the necessary services and technology that are needed to make websites accessible online. Web hosting is of various types such as shared, reseller, dedicated, VPS, cloud, WordPress etc. Web hosting companies provide different plans for each type of hosting service. The most efficient web hosting companies are sometimes referred to as the, “Best Windows Shared Hosting Company”or as the, “Best Linux Dedicated Hosting Company” or as the “Top Cloud Hosting Company”, depending on the type of web hosting service. Source:https://www.htshosting.org/knowledge-base/technology/137/how-to- restore-a-user-s-database-access

More Related