2

I create a MySQL database in Laravel using make:createdatabase special command and I create tables in this database but I can't find the database in my project (its path).

5
  • your database should be il your mysql env.. and this depend on your OS ... Commented Mar 21, 2021 at 17:49
  • If you didn't create any migration then I am afraid there is no relative path to your database. But you can find your database related configuration in .env or config/database.php file. Commented Mar 21, 2021 at 17:52
  • @scaisEdge i see it in env i need to open it to see the tables and data inside it Commented Mar 21, 2021 at 19:54
  • @anikislamshojib i created migrations i just need to open it with MySQL to check data Commented Mar 21, 2021 at 19:56
  • 1
    You can't open migration with mysql they are scripting files. You need some sort of client like sqlyug or workbench Commented Mar 22, 2021 at 4:04

1 Answer 1

1

as in https://laravel.com/docs/8.x/database

Configuration The configuration for Laravel's database services is located in your application's config/database.php configuration file. In this file, you may define all of your database connections, as well as specify which connection should be used by default. Most of the configuration options within this file are driven by the values of your application's environment variables. Examples for most of Laravel's supported database systems are provided in this file.

Laravel makes it very easy to manage your database connections through

app/config/database.php.
'mysql' => array(
    'driver'    => 'mysql',
    'host'      => 'localhost',
    'database'  => 'database', 
    'username'  => 'root',
    'password'  => '',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
),
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.