BadChoice / handesk

A Powerful Laravel Help Desk and Lead Management App
https://github.com/BadChoice/handesk
MIT License
1.4k stars 386 forks source link

Error on installation #168

Open h1ps opened 6 years ago

h1ps commented 6 years ago

Hi everyone,

i tried the installation steps that you provide on this githup readme but i fail at the point of load data to the database.

In Detail at the command "php artisan migrate --seed".

I get the following error:

php artisan migrate --seed

In Connection.php line 664:

  SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tab
  les where table_schema = handesk2 and table_name = migrations)

In Connector.php line 67:

  SQLSTATE[HY000] [2002] No such file or directory

My system is osx 10.13.6 .

Does someone know what i am doing wrong? or where the error comes from?

Best regards, h1ps

instanttim commented 6 years ago

Same thing happened to me, it appears as though the migration step wouldn't be necessary for a new install, and the tables don't exist to migrate.

However, there are no instructions on how to ACTUALLY start new. Seems odd. I really liked the look of this app, but my inability to get it installed and running is kind of a problem...

BadChoice commented 6 years ago

@h1ps and @instanttim thank you for your feedback, can you send me an image of the database it created?

The first step you need is to have a database created and set its credentials to the .env file, once you have the database you can do

instead of php artisan migrate --seed

in two steps

php artisan migrate php artisan db:seed

If the first fails, it looks like the database handesk is not created in you systems, you can use the sequel pro software to create new databases or the command line itself

Let me know

instanttim commented 6 years ago

I was working remotely and borked my remote process. But before I did I think I discovered that it’s a laravel issue because it assumes a specific path for the socket file for MySQL. I’m using MAMP and the socket is located elsewhere... and I guess it uses the socket if you have “localhost” instead of an IP.

I’ll fix it by either using an IP or patching the socket location. But it’ll have to be tomorrow when I have physical access again.

For reference in case it’s something you want to add to the readme; Here’s what I see when I try to run the commands…

BadChoice commented 6 years ago

Great! thank you! let me know if you find the solution so I can put it on the readme as well

instanttim commented 5 years ago

Sure enough, the migrate and db:seed both worked fine once I added the following to the .env file. A lot of info out there said I'd have to edit the config/database.php to in order for it to use the override in the .env file, but when I looked at it the current versions must have been updated for this situation, no editing was necessary. Just need to set DB_SOCKET to the path of your socket file, in the case that you're using localhost and it defaults to trying to use sockets instead of IP connections.

DB_SOCKET=/Applications/MAMP/tmp/mysql/mysql.sock

instanttim commented 5 years ago

Obviously for a lot of people, the socket file will be in /tmp/mysql.sock or somewhere similar. The MAMP case is obviously weird because it's not the system installed mysql.

instanttim commented 5 years ago

Additional note, the readme.md could tell you what the url is to get started... I've never used any laravel-based apps or anything, it took me 15 min to get a page to load properly. I kept clicking on various .php files which leaves the .php in the URL and that causes CSS and IMG tags to all be malformed.

joveice commented 5 years ago

@instanttim I don't see where the readme file could have been better, as mentioned in the readme it's installed like a default laravel installation. If you have .php in your URL you need to configure pretty URL's, and if you have multiple php files to choose from you are probably serving from the wrong directory. The web root should be public/

crishnakh commented 3 years ago

I have the same error and DB_SOCKET doesn't work...