1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to generate new secure MySQL password on cPanel server & change .php file (cPanel)

Discussion in 'Site & Server Administration' started by postcd, Mar 24, 2019.

  1. #1
    Hello,

    MySQL removed support for 4.1 style passwords from 5.6 and so caused alot of trouble when migrating old mysql accounts to new mysql.

    I am wondering how to bulk update mysql passwords and also .php files which contain old passwords to reflect the change.

    My ideas on the process are these:
    1. can i discover some mysql user plain text password as a server root? If not, then discover list of users and for each user find their .php files that contains both "username_" and "localhost" - as these files likely are the db configuration .php files.

    2. somehow generate new string that meets mysql high security standards into the future (i do not know yet how on Linux command line generate such string to meet the password complexity or if password complexity is all needed in order newest MySQL accept the password.)

    3. replace the password in above found file by newly generated one

    4. change the actual mysql password

    Do you please have inputs about mine mentioned steps to automate this process or is there already made script for this?
     
    postcd, Mar 24, 2019 IP