Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. php artisan migrate:install
  2.  
  3. {"error":{"type":"ErrorException","message":"PDO::__construct(): [2002] Connection refused (trying to connect via tcp://127.0.0.1:3306)","file":"/Applications/MAMP/htdocs/DRCSports/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php","line":47}}
  4.  
  5. 'mysql' => array(
  6. 'driver' => 'mysql',
  7. 'host' => '127.0.0.1',
  8. 'database' => 'Laravel_DRCSports',
  9. 'username' => 'root',
  10. 'password' => 'root',
  11. 'charset' => 'utf8',
  12. 'collation' => 'utf8_unicode_ci',
  13. 'prefix' => '',
  14. ),
  15.  
  16. 'mysql' => array(
  17. 'driver' => 'mysql',
  18. 'host' => 'localhost:8889',
  19. 'database' => 'pic',
  20. 'username' => 'root',
  21. 'password' => 'root',
  22. 'charset' => 'utf8',
  23. 'collation' => 'utf8_unicode_ci',
  24. 'prefix' => '',
  25.  
  26. ),
  27.  
  28. 'cluster' => false,
  29.  
  30. 'default' => array(
  31. 'host' => '127.0.0.1',
  32. 'port' => 8888,
  33. 'database' => 0,
  34. ),
  35.  
  36. ),
  37.  
  38. 'mysql' => array(
  39. ...
  40. 'host' => 'localhost',
  41. 'port' => '8889',
  42. ...
  43. )
  44.  
  45. 'mysql' => array(
  46. ...
  47. 'host' => 'localhost:8889',
  48. ...
  49. )
  50.  
  51. $my_hostname = 'localhost';
  52. $my_port = '8889';
  53. $my_database = 'database';
  54. $my_username = 'username';
  55. $my_password = 'password';
  56.  
  57. if (App::runningInConsole()) { // artisan runs from the command line
  58. // change 'localhost' to 'localhost:8889'
  59. $my_hostname = $my_hostname.':'.$my_port;
  60. }
  61.  
  62. 'mysql' => array(
  63. 'driver' => 'mysql',
  64. 'host' => $my_hostname,
  65. 'port' => $my_port,
  66. 'database' => $my_database,
  67. 'username' => $my_username,
  68. 'password' => $my_password,
  69. 'charset' => 'utf8',
  70. 'collation' => 'utf8_unicode_ci',
  71. 'prefix' => '',
  72. ),
  73.  
  74. 'mysql' => array(
  75. ...
  76.  
  77. 'pconnect' => 'TRUE',
  78. ...
  79. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement