i have a problem with migrate on laravel 5.8 - laravel-5.8

the error:
Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] No such
file or directory (SQL: select * from information_schema.tables where
table_schema = eurofleet and table_name = migrations and table_type =
'BASE TABLE')
Does anyone have any idea?

Related

Database Connection Error in Plsek VPS Laravel

SQLSTATE[HY000] [1045] Access denied for user 'user_name'#'localhost' (using password: YES) (SQL: select * from `users` where `email` = admin#gmail.com limit 1)
I have added all the required attributes in .env file but I am getting this error.
How can I solve it?

Invalid Integer Value DB Port In Digital Ocean Apps Platform

I am currently have problem on my deployment side which is when I run the php artisan migrate:refresh it gives of
SQLSTATE[08006] [7] invalid integer value "${db.PORT}" for connection option "port" (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type = 'BASE TABLE')
Hosting:
Digital Ocean
Platform:
Laravel Latest Version
Environment Variables Setup:

Getting PDO Excepetion error while migrating tables

I am getting following exception while migrating tables.
Uncommented pdo_mysql from php.ini file
Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = blog and table_name = migrations)

Laravel Eloquent Update Error

I am trying to update a row with eloquent in laravel 5.5 but i get this error.
In Connection.php line 664:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1769888, `longitud` = -8,4700727 where `id` = '7'' at line 1 (SQL: update `centro` set `updated_at` = 2018-02-19 15:58:01, `latitud` = 43,1769888, `longitud` = -8,4700727 where `id` = 7)
In PDOStatement.php line 107:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1769888, `longitud` = -8,4700727 where `id` = '7'' at line 1
In PDOStatement.php line 105:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1769888, `longitud` = -8,4700727 where `id` = '7'' at line 1

sql 42S22 error in Laravel (choosing a column I didn't mention)

I am doing a basic project in Laravel, when trying to delete an entry, it generates this error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select * from `employees` where `id` = 6 limit 1)
and it is true I don't have a column named 'id', instead I have employee_id, but why is it choosing id instead of employee_id?
Please explain from where did it bring this id column?
In your Employee model (Employee.php), add
protected $primaryKey = 'employee_id';
This will tell Laravel to use employee_id as the primary key for Empolyee objects.

Resources