Mysql user creation script

后端 未结 7 669
猫巷女王i
猫巷女王i 2021-02-02 10:00

I\'m trying to automate MySQL user creation procedure. I thought of creating a temp file that would contain mysql user creation statements, then I would have call it like this :

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-02 10:29

    I opened phpMYAdmin and went to the the users tab, found the user i was trying to connect with clicked Edit Privileges, scrolled down to the Change Login Information / Copy User section and choose Any host for the Host option, it was set to local. When I clicked the Go button, it generated a script similar to the ones listed here.

    GRANT ALL PRIVILEGES ON * . * TO 'james'@'%' IDENTIFIED BY PASSWORD '*780E1D13F1C7713F341A117499C6D8644464C4CF' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
    

提交回复
热议问题