Questions tagged [artisan-migrate]
192 questions
1
vote
1 answer
Solution To "Could not find driver" & "can't connect to local MYSQL server through socket" - Laravel
Hi All, Since I'm a newbie to laravel. First time coming to LARAVEL. I Faced lots of problem regarding command like "php artisan migrate".
Error Like,
[PDOException]: Could not find driver
[PDOException]: Can't Connect to local MYSQL server…

Nana Partykar
- 10,556
- 10
- 48
- 77
1
vote
3 answers
Could not connect to local MySQL server with Laravel
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] …

Nana Partykar
- 10,556
- 10
- 48
- 77
1
vote
0 answers
Laravel : Migration table created successfully, but the tables don't getting created at all
I run my migrations but in the migrate mysql table don't appear all the migrations classes.
These are my migrations
And this is the migration table:
As you can see, the last migration registered in the table is from 2014-09-25, but I have till…

Iván Casanova
- 351
- 1
- 6
- 16
1
vote
3 answers
Laravel migration error SQLSTATE[42000]
I have a couple of Laravel migrations.
1-create_countries_table`
Schema::create('countries', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
…

Bijan Mohammadpoor
- 99
- 3
- 11
1
vote
2 answers
php artisan make:migration AppServiceProvider not found LARAVEL 5
I'm new to Laravel 5 and I'm trying to do
php artisan make:migration create_projects_and_tasks_tables --create="projects"
and I got this error:
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'dodong\Providers\AppServiceProvider' not…

Juliver Galleto
- 8,831
- 27
- 86
- 164
1
vote
2 answers
Cant create table in laravel
i have this issue that i dont know exactly migration and seed db working in laravel (php artisan) and i have this model :
use Illuminate\Auth\UserInterface;
class User extends Eloquent implements UserInterface {
public function…

ᴀʀᴍᴀɴ
- 4,443
- 8
- 37
- 57
0
votes
0 answers
ec2 php artisan migrate SQLSTATE[HY000] [2002] Connection refused
I am running Laravel 8.83.23 on EC2. The application is working fine.
I connect to the instance using EC2 Instance Connect and try to check the state of migration:
php artisan migrate:status
I get 'SQLSTATE[HY000] [2002] Connection refused'
Which…

Smalltalkman
- 33
- 4
0
votes
0 answers
Laravel with Postgres in Docker container SSL error
I have a docker-compose file for Laravel project. It consist from Postrges PHP 8 and Nginx. Contaienrs are running. So I tried to run composer install on PHP container and then php artisan migrate which throws me an error:
PDOException…

Čamo
- 3,863
- 13
- 62
- 114
0
votes
0 answers
It is possible to install php artisan on a non laravel project?
Could this be a good idea? I want to upgrade my app, installing new stuff like artisan commands and functionalities like, create migration, instead of creating a new Laravel app.
What do You guys think?

Marcello Pato
- 500
- 6
- 21
0
votes
0 answers
SQLSTATE[HY000] [2002] Connection refused Don't know what to do
I'm using a MacbookPro M1. I am trying to run php artisan migrate, but it keeps giving me this error message.
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from
information_schema.tables where table_schema = library-app and
table_name =…

UkiyoE
- 1
- 1
0
votes
1 answer
Can we exclude a custom service provider when running php artisan migrate in laravel?
I have a custom service provider in which I am accessing a model in boot(). But when I run php artisan migrate, it shows the below error:
[Illuminate\Database\QueryException] SQLSTATE[42S02]: Base table or view not found: 1146 Table '********'…

chithra
- 756
- 7
- 12
0
votes
1 answer
Laravel 9 Migration ForeginKey not created
I have some problem with the Laravel 9 migrations. After i run the "php artisan migrate" command every table created with the indexes. So everthings just fine except the foregin key. I don't have any idea why, maybe someone know what causes the…

EvilDeadTX
- 29
- 1
- 7
0
votes
1 answer
Artisan::call('migrate:fresh') on php script making the site unavailable for the first time and works on next reload
I am using the below method
private function migrate(BufferedOutput $outputLog)
{
try {
Artisan::call('migrate:fresh', $outputLog);
} catch (Exception $e) {
return $this->response($e->getMessage(), 'error',…

OutForCode
- 381
- 9
- 26
0
votes
0 answers
Unable to create custom php app in shopify
I am trying to create a PHP app in Shopify. But when I try to create the app it is showing as error mentioned below
Application key set successfully.
┃
┃ Illuminate\Database\QueryException
┃
┃ could not find driver (SQL: PRAGMA foreign_keys…

Sajin Shereef
- 119
- 1
- 1
- 7
0
votes
1 answer
php artisan error after repo clone SQLSTATE[42S02]: Base table or view not found:
I made a Laravel project with Jetstream and uploaded it to Github. After my colleague and I tried to execute composer install, we received the following error:
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover…