亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

php bin/console doctrine:database:create 操作超時或連接被

php bin/console doctrine:database:create 操作超時或連接被

PHP
絕地無雙 2022-12-30 17:55:10
我正在嘗試使用 doctrine 在我的 mysql 中創建一個表。(我正在使用法語視頻學習 symfony:https ://www.youtube.com/watch?v= UTusmVpwJXo ,似乎該視頻是基于以前版本的 synfony 但是嘿,應該差不多吧) .所以我運行的命令是:php bin/console doctrine:database:create不幸的是我有這些結果:doctrine.yamldoctrine:    dbal:        default_connection: default        driver: 'pdo_mysql'        url: '%env(resolve:DATABASE_URL)%'        server_version: '7.4.4'    orm:        auto_generate_proxy_classes: true        naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware        auto_mapping: true        mappings:            App:                is_bundle: false                type: annotation                dir: '%kernel.project_dir%/src/Entity'                prefix: 'App\Entity'                alias: App然后是我的.env# In all environments, the following files are loaded if they exist,# the latter taking precedence over the former:##  * .env                contains default values for the environment variables needed by the app#  * .env.local          uncommitted file with local overrides#  * .env.$APP_ENV       committed environment-specific defaults#  * .env.$APP_ENV.local uncommitted environment-specific overrides## Real environment variables win over .env files.## DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.## Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration###> symfony/framework-bundle ###APP_ENV=devAPP_SECRET=b3b1c82ba50949ebe4f89ac492c6c7f6#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16#TRUSTED_HOSTS='^(localhost|example\.com)$'###< symfony/framework-bundle ###我沒有設置任何密碼,我的 phpmyadmin 在以下位置正確運行http://127.0.0.1:8080/phpmyadmin/我的 mysql conf 看起來像這樣:也許它改變了什么(但我不這么認為),我的主頁正在運行http://127.0.0.1:8000/blog并且運行良好。我用啟動服務器symfony server:start -d。你們知道我在這里做錯了什么嗎?感謝您以后的幫助!在這個困難時期保持堅強并學習更多!
查看完整描述

1 回答

?
慕村225694

TA貢獻1880條經驗 獲得超4個贊

我終于在這里找到了我的解決方案 -> Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server

這是 sql 作為安全進程的默認行為。

我按照答案中描述的確切步驟進行操作并且有效。


查看完整回答
反對 回復 2022-12-30
  • 1 回答
  • 0 關注
  • 126 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號