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

Can't create a new Database #1348

Closed
Sirezul opened this issue Oct 1, 2018 · 1 comment
Closed

Can't create a new Database #1348

Sirezul opened this issue Oct 1, 2018 · 1 comment

Comments

@Sirezul
Copy link

Sirezul commented Oct 1, 2018

Hello, first of all thank you so much for the great Work on this Project!
I'm really thankful for this GamePanel Solution, its great.
But I really struggle on creating a Database.

Background:

  • Panel or Daemon: Panel
  • Version of Panel/Daemon: 0.7.7
  • Server's OS: Debian 9.5
  • Your Computer's OS & Browser: OS X, Google Chrome
  • PHP Version: 7.2.9

Describe the bug
Can't create a Database for a Gamserver.
I followed the MySQL Instructions as written in the Docs:

GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
FLUSH PRIVILEGES;

In my Case I did it with the User 'panel'@'localhost'

And I also added the Database on the Admin Control Panel:
image

Also I checked my database.php:

    'connections' => [
        'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', 'localhost'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'panel'),
            'username' => env('DB_USERNAME', 'panel'),
            'password' => env('DB_PASSWORD', 'MYPASSWORD'),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => env('DB_PREFIX', ''),
            'strict' => env('DB_STRICT_MODE', false),
        ],

and the .env in the Root Directory:

DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=panel
DB_USERNAME=panel
DB_PASSWORD=MYPASSWORD

To Reproduce

  1. Go to the Gameserver
  2. Database
  3. Create New
  4. Whoops, looks like something went wrong.

Here is my tail:

#66 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then
#67 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter
#68 /var/www/pterodactyl/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle
[

2018-10-01 19:31:03] production.ERROR: QueryException: SQLSTATE[42000]: Syntax error or access violation: 1044 Access denied for user 'panel'@'localhost' to database 's3_test' (SQL: CREATE DATABASE IF NOT EXISTS s3_test) in

/var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
Stack trace:
#0 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback
#1 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Connection.php(459): Illuminate\Database\Connection->run
#2 /var/www/pterodactyl/app/Repositories/Eloquent/DatabaseRepository.php(204): Illuminate\Database\Connection->statement
#3 /var/www/pterodactyl/app/Repositories/Eloquent/DatabaseRepository.php(129): Pterodactyl\Repositories\Eloquent\DatabaseRepository->run
#4 /var/www/pterodactyl/app/Services/Databases/DatabaseManagementService.php(79): Pterodactyl\Repositories\Eloquent\DatabaseRepository->createDatabase
#5 /var/www/pterodactyl/app/Http/Controllers/Admin/ServersController.php(579): Pterodactyl\Services\Databases\DatabaseManagementService->create
#6 (0): Pterodactyl\Http\Controllers\Admin\ServersController->newDatabase
#7 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array
#8 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction

Many Thanks in Advance!
PS: Sorry if I did something wrong this is my first Issue Report on GitHub

@lancepioch
Copy link
Contributor

Your mysql privileges are wrong.

Our Discord can help you drill down to what might've went wrong: https://pterodactyl.io/discord

My initial guess is because you used 'panel'@'localhost' instead of 'panel'@'127.0.0.1', some versions and settings this can make a difference. Otherwise you might have a different user in your env than the one you gave permissions to use.

Closing because this isn't a panel issue.

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

2 participants