Trying to install next cloud error [hy000] [2002]

i am trying to install next cloud

i am stuck on the create an admin page

i get the error “error while trying to create admin user failed to connect to the database exception occured in driver sqlstate[hy000] [2002] nextcloud”

i get a few others depending on what i put in the database fields what am i supposed to put in there or what am i other wise doing wrong

MySQL is fun isn’t it?

Try changing localhost to

I usually install my /data folder to my own /home/USERNAME/.nextcloud/data directory to keep in-house. Make sure if you follow this method you do chmod 0770 /home/USERNAME/.nextcloud/data after you create it.

i saw that fix with some google fu
just tried it again and it gives me “SQlSTATE[hy000][1698 access denied” wen i use
any other ideas ?

Other than making sure you are using nextcloud for both the database name and the database username.

What about trying to manually connect to the database via shell?

mysql -u nextcloud -p'YOURPASSWORD'

…you can then type show databases; to see if the nextcloud database does in fact exist.

If you can, then something is being entered wrong, ie; user error.

yep user error did not know i need both the user name and the database to be named nextcloud thank you very much solved :smile:

1 Like

I’m guilty of this on numerous occasions. Glad you’re cooking with hot water now! :confetti_ball: