2

I have problem because I don't have create database

My parameters.yml

parameters:
    database_host: 127.0.0.1
    database_port: null
    database_name: symfony
    database_user: root
    database_password: null
    mailer_transport: smtp
    mailer_host: 127.0.0.1
    mailer_user: null
    mailer_password: null
    secret: ThisTokenIsNotSoSecretChangeIt

Help me, please :)

1
  • Could you @jakub-w please accept my answer if you think it solved your problem or was the most helpful in finding your solution. Thank you. Cheers! Commented Dec 10, 2018 at 10:03

3 Answers 3

5

You need to start your Mysql service,and check if the apche service is listing to 127.0.0.1.
Then just open you CLI, then type:

php bin/console doctrine:database:drop --force
php bin/console doctrine:database:create
php bin/console doctrine:schema:update --force
Sign up to request clarification or add additional context in comments.

1 Comment

You can also use symfony console doctrine:database:drop --force
0

Perhaps not created directory in which you are trying to create a database.

Comments

0

try to install php-mysql or 'php8.2-mysql' orphp8.3-mysql by typing for example for php8.3: sudo apt install php8.3-mysql. type :SELECT VERSION();to check you mysql version , for example for me is : 8.0.39-0ubuntu0.24.04.2 Then allow privilgeges to your user : GRANT ALL PRIVILEGES ON dataBase.* TO 'user'@'localhost'; then to check your privileges on your user , type :SHOW GRANTS for 'user'@'localhost';GRANT DROP ON *.* TO 'user'@'localhost'; FLUSH PRIVILEGES;where "database" is obviously replaced with the name of your database and "user" is obviously replaced with the name of your user. come back to talk if you have questions

regards

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.