WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: WP Security Scan] How do I add ALTER rights to my database (13 posts)

  1. greencode
    Member
    Posted 4 years ago #

    Just so I don't have to do the wp_ changes manually I was wondering if this is a straight-forward thing to add ALTER rights to my database?

  2. Samuel B
    moderator
    Posted 4 years ago #

    your database user (in wp-config.php) should already have all rights
    if not, log in to your hosts mysql controls and give your db user all rights

  3. greencode
    Member
    Posted 4 years ago #

    Mmmm, I've just checked the user and the ALTER checkbox is set to yes. I went back and tried to do it again but this is what is said from the plugin:

    Your User which is used to access your WordPress Tables/Database, hasn't enough rights( is missing ALTER-right) to alter your Tablestructure. Please visit the plugin documentation for more information. If you believe you have alter rights, please contact the plugin author for assistance.

  4. rhorsley
    Member
    Posted 4 years ago #

    I'm getting this exact same problem, and I've already logged in to my host's MySQL admin and confirmed that my user account has all rights and privilegs, including ALTER. I've also used the 'contact plugin author' option and haven't heard back from them yet. Anyone have a solution to this already? Thanks.

  5. book246
    Member
    Posted 4 years ago #

    Same problem here... Anybody???

  6. dreamwhisper
    Member
    Posted 4 years ago #

    Same problem here.

  7. David
    Member
    Posted 4 years ago #

    Just installed WP Security Scan and experiencing the same problem. I've been recommended using phpmyadmin. Will be giving that a shot tonight/weekend.

  8. David
    Member
    Posted 4 years ago #

    OK I've managed to do it! With thanks to these blogs:
    http://wiki.lunarpages.com/PhpMyAdmin_Rename_Table
    http://sltaylor.co.uk/blog/wordpress-hacks-tips-security/

    This all needs doing to change the database beyond default settings therefore making it more secure against hacking

    1) You need to locate 'phpMyAdmin' which for most people's setup will be in your cpanel. Look for "MySQL Databases" and click it.

    2) Towards the bottom of the screen you'll see a list of current databases on your server. If you have just one click on 'modify'. (my messy setup over many months had many and it was from here I was able to locate which ones were in use and which ones could be trashed.) If you have more then head to step 3 to identify each database's contents.

    3) You should now see 'phpMyAdmin' opened and the logo at the top left. Click on the database title under the logo and set of 5 or so icons. NOT the one titled 'information_schema' THE OTHER ONE!! You are of course looking for the database that has all the tables with 'wp_' prefixes. Go back to step 2 until you find it.

    4) next to the first table's title there's an 'Action' column with 6 icons. Click on the 2nd icon with the little hand called 'structure'

    5) across the top of the screen there is now a menu. Locate 'Operations' and click it.

    6) locate 'table options' then 'rename table to'. This is where you rename the table prefix only. That's the bit before underscore '_'. Once you done this click 'go' to save you alteration.

    7) click back on the database name on the left which should now be BLUE and rename each table from step 4 until you've altered them all.

    8) again click on the database name on the left. Then the structure icon next to the table 'yourprefix_options' table. Click on the menu option 'Browse' and use arrow buttons to locate the page the option_name 'wp_user_roles' is on (mine was on page 7). Click on the edit/pencil icon and again change the prefix. The click 'Go'

    9) again click back on the database name on the left. Then the structure icon next to the table 'yourprefix_usermeta'. Click on the menu option 'Browse' and use the edit/pencil icon on each metakey that uses the old 'wp_' to your new prefix. Clicking 'Go' each time you've altered the prefix.

    10) click on the exit/logout icon at the top left of the screen

    11) back in cpanel locate your wordpress files folder and edit the 'wp-config.php' file. Locate '$table_prefix' and the old 'wp_' again to your new prefix. Save this file.

    That's it.. job done.

    You may need to also alter the username from admin if you're currently using that. Again phpMyAdmin can do that but I'll do another comment here to reduce confusion.

  9. David
    Member
    Posted 4 years ago #

    To alter the username from admin to something more secure do the following:

    1) be sure you have your wordpress admin password written/saved somewhere

    2) follow the steps (1-3) above to open your database within phpMyAdmin

    3) click on the option down the left 'yourprefix_users' which opens a list of all your registered blog users. NICE!

    4) locate the 'admin' one and click on the edit/pencil icon

    5) locate 'user_login' which will currently be admin and change it to your more secure username

    5) click 'Go' and click 'exit/logout' at he top left of screen

    6) Login to your blog's admin with the new username and your previously noted password

    done! ;)

  10. g4zilla
    Member
    Posted 4 years ago #

    @areyoufitenough: Thanks for that post on renaming the database prefix! I spent some time searching around, as I too was having difficulty trying to rename the prefix. Thanks to your step-by-step, I got it done!

  11. sleeplessinDC
    Member
    Posted 4 years ago #

    areyoufitenough Thank you for the excellent set of instructions for both the database table names and the admin user change. Hopefully you are a technical writer helping users with difficult installation tasks. :-) If not, you should be.

  12. Shane2
    Member
    Posted 4 years ago #

    Thanks for this guide!
    I got most of the way through it. Unfortunately, I get a "forbidden" and "404" when I try to modify wp_user_roles (whether I do it before or after changing the table prefixes).
    Anyone have a similar issue?

    WP security scan also won't change the prefixes because it says it's missing ALTER rights, even though these are set up in the cpanel.

  13. redcouchstudio
    Member
    Posted 4 years ago #

    areyoufitenough - Thank you so much for a well-written guide on how to change your database prefix! Kudos to you!

Topic Closed

This topic has been closed to new replies.

About this Topic