ccarney16 / pterodactyl-containers

Pterodactyl Panel within a docker container
230 stars 78 forks source link

Initial user creation - Unknown column 'username' #145

Open TaylorS opened 1 year ago

TaylorS commented 1 year ago

Followed the quickstart and everything seems to be setup correct with the exception of the users table.

When I attempt to run bin/artisan p:user:make I get the following error:

In Connection.php line 712:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'where clause' (SQL: select count(*) as aggregate from `users` where `username` = tobes)

In Exception.php line 18:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'where clause'

In PDOConnection.php line 82:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'username' in 'where clause'

Looking at the database I see the users table has uuid but no username column :

+----------------+---------------------+------+-----+---------+----------------+
| Field          | Type                | Null | Key | Default | Extra          |
+----------------+---------------------+------+-----+---------+----------------+
| id             | int(10) unsigned    | NO   | PRI | NULL    | auto_increment |
| uuid           | char(36)            | NO   | UNI | NULL    |                |
| email          | varchar(191)        | NO   | UNI | NULL    |                |
| password       | text                | NO   |     | NULL    |                |
| remember_token | varchar(191)        | YES  |     | NULL    |                |
| language       | char(5)             | NO   |     | en      |                |
| root_admin     | tinyint(3) unsigned | NO   |     | 0       |                |
| use_totp       | tinyint(3) unsigned | NO   |     | NULL    |                |
| totp_secret    | char(16)            | YES  |     | NULL    |                |
| created_at     | timestamp           | YES  |     | NULL    |                |
| updated_at     | timestamp           | YES  |     | NULL    |                |
+----------------+---------------------+------+-----+---------+----------------+
11 rows in set (0.001 sec)

I am unsure where the failure is happening in terms of users table creation or of the p:users:make command is the issue?

ccarney16 commented 1 year ago

It sounds like deployment was not completely successful, is this a new installation? If its new, check laravel logs in data/panel/storage/logs if your using my deployment solution.

TaylorS commented 1 year ago

You're correct, it looks like my containers are hitting [2002] Connection refused errors on setup. I am running Docker Desktop on Windows with WSL2 so I am guessing it is something to do with my docker configuration. I'll keep digging, thanks!

TheUntraceable commented 1 year ago

What was the fix to this issue?