Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do i insert an admin user into my mysql database? #541

Open
charon-gg opened this issue Jan 21, 2020 · 7 comments
Open

how do i insert an admin user into my mysql database? #541

charon-gg opened this issue Jan 21, 2020 · 7 comments

Comments

@charon-gg
Copy link

pls help

@charon-gg
Copy link
Author

it fails to create one on setup, it gives me an error on the finish setup page but it lets me create an account and login.

@NickkoG
Copy link

NickkoG commented Jan 23, 2020

Same problem here.
I'm on a shared hosting by OVH.

@grfbr
Copy link

grfbr commented Feb 10, 2020

Try the geolocation steps and after re-install the system!

#544 (comment)

@GomoDD
Copy link

GomoDD commented Jun 8, 2020

@charon-gg open your mysql database, locate and open your "users" table and then change user "role" to "admin"

@x247nl
Copy link

x247nl commented Jun 12, 2020

as what @GomoDD stated, then logout and log back in fixed it for me.

@raindropworks
Copy link

@GomoDD - Attached is the data I have in my users table - it's still not working, any idea?
Screen Shot 2020-07-26 at 7 26 20 PM

I wasn't sure if I should have put in MD5 for the password or something. ANy help is much appreciated.

For what it's worth, I can confirm that in my install, it does hash the password in the database, which of course means the instructions about 'manually adding an admin user/pass is horribly oversimplified and missing a ton of instructions at best.

I did find a few tidbits in my attempts to install that might be useful:

  • I set up for open registrations. It's not what I ideally wanted, but I suspect the .env file can be changed later to disable that (not sure why not in the admin panel, but that's a different issue)
  • Made a new account with new password, then dropped into myphpadmin, and in the user table it indeed showed a hashed password for the new account. Typing 'admin' (no quotes) in the role field, and then logging out and back in did indeed give me admin access on that account.
  • After logging in to my site, I was able to see that the original account that I tried to make as an admin was 'inactive', which probably would have been a whole new issue even if the password was hashed in the database
    image
  • It looks like if the active field had been set to '1' that could have potentially addressed that issue too
    image

@GomoDD
Copy link

GomoDD commented Mar 16, 2021

@minakitty Not sure what's causing these issues during the creation of first (admin) account. I've set it up months ago and spent hours and hours troubleshooting issues and looking for documentation. I recently noticed that there's been an update aaand I'm sooo not looking forward to updating / upgrading. That is, if it's even possible .. (why? 1. I have some additional code 2. the documentation is poor).

You've resolved the issue now, right? by creating a second user and giving him an admin role?
As for the ".env" file, yes, registrations and that kind of stuff can be modified later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants