Laravel Homestead-authentication not working - laravel

I've setup Homestead and the site is up and running. It connects to my database and migrates tables.
The problem is that when I create a new project with authentication using this command : laravel new blog --auth, when I go to the register page and want to register a user I get this error:Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] (SQL: select count() as aggregate from users where email = vlad#yahoo.com)*. The user is not inserted into the database and cannot go further.

Found out this post: stackoverflow.com/a/41247114/11003430 and I've changed 127.0.0.1 to localhost and now it works. Don't know why though

Related

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ahimalayan.localizations' doesn't exist

I'm not a Laravel developer, but I bought a website from CodeCanyon, and this is the error I'm getting.
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'ahimalayan.localizations' doesn't exist (SQL: select * from
localizations where ip = 223.185.4 limit 1)
And the service provider is not answering much, and I need to upload it asap but he told me to use php artisan migrate:fresh—seed, but I'm not sure where to use it and how to use it. Can anyone please help? I'm a little bit friendly with coding.
I suggest this steps for your problem :
you need to create a new database in host control panel
Rename example.env file name to .env in main root folder and put new database data inside that. just like this:
DB_DATABASE=DB NAME
DB_USERNAME=DB USERNAME
DB_PASSWORD=DB PASSWORD
then add this line inside routes/web.php file:
Route::get('migrate', function() {
\Illuminate\Support\Facades\Artisan::call('migrate:fresh -—seed');
});
now open this url on your browser to run migrations and seeds. then all required tables will be created automatically and some demo data will be inserted as well.
http://localhost/LaravelFolder/public/migrate
You likely need to run these 2 commands in your app root path.
php artisan migrate
php artisan db:seed

Unable to bind Application item - Oracle Apex

I have created 2 application items in shared component option.
Protection level: Restricted
Scope: Application
Then I have created a process in the login page where sql query is
select user_id, name into :G_USER_ID , :G_USER_NAME
from t_users
where upper(email) = upper(:P9999_USERNAME);
When I try to login it gives me error. Debugging says that there is an error in the above statement. I am not able to bind these items.
I'm using apex 19.1
It would help if you said which error you got.
However, if this piece of code runs before you managed to log in, you didn't establish connection to the database (yet) and can't select from any table, including t_users.

phpmyadmin wont let me create a database

It says #1044 - Access denied for user "#'localhost' to database 'magento1'
I'm trying to set up Magento CMS and I got to this step and suddenly it won't let me create a new database.
I'm on Magento 2.2.5. Latest Wamp server.
It say what your password is incorrect .
Check or change password.
And try

Laravel - Moved project now can't login

I have an existing Laravel 5.6 project, I have moved it over to a new Bitnami WAMP installation.
I have migrated the database and seeded it so it contains my user account, but whenever I attempt to log in I get the following error..
these credentials do not match our records
I have confirmed the password is correct and that it can access the database, is there anything else I should be checking?
I am leaning towards it being a configuration issue with the Bitnami install but am slightly lost on where to be checking.
Change .env file, DB name, DB user name And DB Password
composer update
php artisan key:generate

Laravel 5.2 How to authenticate with a real mysql database

I'm new with laravel, I read the documentation of laravel, but I don't know how I make an authentication with a real mysql database.
I mean, I see that there is a php migration command, but it makes a table in php and not in my database right ?
Actually, I have a mysql database with a user table with login and password.
I'm lost with this framework, because I never used a php framework.
Thanks !!
Edit :
Excuse me, I misspoke and my problem has evolved, how did you to authenticate with a user table already exists in the database by using the Authentication service?
in .env or config>database.php you can set your database and related database connections configurations
after that create migrations and run them it will create database tables in your database as per your .env or config>database.php database configurations.
I think you might need to read again Laravel documentations.
Try the following.
Make sure you have a database create in your MySql.
Check again your .env for: database_host, database_name, database_user, database_password - make sure you have the right
Try bellow code on your route.php
Route::get('/', function () {
if(DB::connection()->getDatabaseName())
{
echo "Yes! successfully connected to the DB: " . DB::connection()->getDatabaseName();
}
});
If above is successful your migration should work.

Resources