artisan-migrate

Password authentication failed error on running laravel migration

南楼画角 提交于 2020-08-09 08:19:44
问题 I am trying to deploy my Laravel app on a DigitalOcean droplet. The droplet is setup with nginx, php7, and postgres, I follow up the tuts from DigitalOcean on how to set them up. Then I try to follow this tutorial on how to deploy the Laravel app using the git hook and so on. Now the app itself is up and running, I can access the pages and all. But I can't run php artisan migrate . I have been changing the database username, name, password on .env file, but I always get the exact same error:

Laravel 5.3 migration doesn't create tables

淺唱寂寞╮ 提交于 2019-12-12 15:14:44
问题 I created some migrations using the command php artisan migrate:make and then filled it and saved it with some fields. This is a fresh installation and the first migration to run. I ran php artisan migrate and the migration completed successfully. However, while the migrations table IS created, and it has a single row with the filename and batch 1, there is no table. Here's my migration file code: use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate

Laravel locally run artisan commands effect VM environment

点点圈 提交于 2019-12-12 01:56:16
问题 I am looking for a solution that will allow me to run artisan commands from my local machine and for them to take effect on my homestead VM. For example, when running php artisan migrate the command is run using the information stored in the .env file points to the VM, but my terminal is trying to run them locally. The majority of the commands run successfully because they do not need drivers from the remote machine. Running php artisan route:list works fine. How can I run artisan commands

laravel : php artisan suddenly stop working

谁说我不能喝 提交于 2019-12-11 02:38:11
问题 I know that there bunch of questions out there but mine doesn't seems fit in any. I am working on laravel. php artisan was working fine an hour before. After that i just created a controller, a model and few views blade. Now artisan simply won't work and no error at all . Even php artisan --version won't show anything. I DIDN'T do any major changes like composer install, or update or install any new package. Neither any server configuration. It was just basic coding on controller , model and

Laravel 5 + PostgreSQL: “Database [postgres] not configured.” Error

拈花ヽ惹草 提交于 2019-12-10 12:43:13
问题 I'm trying to get started with Laravel + PostgreSQL and been following the database tutorial. Unfortunately, after updating the database configuration file and running php artisan migrate , the following error appears: [InvalidArgumentException] Database [postgres] not configured. What puzzles me is that I didn't specify the "postgres" database in the configuration, but another database I set through cPanel, say "example_database". Here's some relevant parts of my /config/database.php

Laravel Migration stalls and doesn't do anything

与世无争的帅哥 提交于 2019-12-07 07:32:38
问题 Just went through all the steps listed on the Laravel site to install and get up and running for MacOS HighSierra . I currently have Composer, Homebrew, valet, PHP 7.2.8, MySQL version 8.0.11 and Laravel 5.6.28 installed. I can create a new project by doing the Laravel new blog command and not have any problems. Also when I go to my browser I can see current project I just created or am working on. I can run the valet list command and so I know its running/working. I also can create a

How to use global prefix for tables in Laravel 5

戏子无情 提交于 2019-12-07 06:11:20
问题 New in Laravel. Probably a silly question. I had setup database like this: 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3306'), 'database' => 'mydb', 'username' => 'myusername', 'password' => 'mypassword', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => 'admin', 'strict' => false, 'engine' => null, ], Notice 'prefix' => 'admin' . This is because I want all tables related to the website's control panel be prefixed with

How to use global prefix for tables in Laravel 5

随声附和 提交于 2019-12-05 10:11:49
New in Laravel. Probably a silly question. I had setup database like this: 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'port' => env('DB_PORT', '3306'), 'database' => 'mydb', 'username' => 'myusername', 'password' => 'mypassword', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => 'admin', 'strict' => false, 'engine' => null, ], Notice 'prefix' => 'admin' . This is because I want all tables related to the website's control panel be prefixed with admin , e.g: admin_users, admin_log, etc... But I'm stuck at the very beginning. I'm trying to create

Laravel migration (errno: 150 “Foreign key constraint is incorrectly formed”)

落爺英雄遲暮 提交于 2019-12-04 08:27:51
问题 I have an orders table and a have a sell_shipping_labels which references orders.id as a foreign. However when I run the Laravel migration I get the dreaded error code: [Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 1005 Can't create table cheapbooks_test . #sql-b5b_b2a (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table sell_shipping_labels add constraint sell_shipping_labels_order_id_foreign foreign key ( order_id ) references orders ( id ))

Could not connect to local MySQL server with Laravel

限于喜欢 提交于 2019-12-04 05:07:02
问题 When I run this command find / -name my.cnf I find two locations for my.cnf /opt/lampp/etc/my.cnf /etc/mysql/my.cnf I don't get which one is used by MySQL server? And, when i run command php artisan migrate , I get this error [PDOException] SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket ' /var/run/mysqld/mysqld.sock' (2) You can all see very clearly the error path showing /var/run/mysqld/mysqld.sock (Actually, in my system/desktop. There is no folder name "mysqld"