Last active
August 29, 2015 13:59
-
-
Save junwatu/10804657 to your computer and use it in GitHub Desktop.
Laravel 4 Tips & Troubleshooting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**1.** Artisan migrate or db:seed error because of false mysql.sock config | |
**Problem:** | |
Command `artisan migrate` or `artisan db:seed` have this error message | |
[PDOException] SQLSTATE[HY000] [2002] No such file or directory | |
**Solution:** | |
Type this command | |
php -i | grep pdo | |
Will output like this | |
pdo_mysql.default_socket => /tmp/mysql.sock => /tmp/mysql.sock | |
check in `/etc/my.cnf` the sock file is actually in | |
/var/run/mysqld/mysqld.sock. | |
So,edit php.ini and set the value for `pdo_mysql.default_socket` to | |
pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock | |
**2.** ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment