Troubleshooting No such file or directory when running `php app/console doctrine:schema:create`
I fixed it by following this small tutorial: http://andreys.info/blog/2007-11-07/configuring-terminal-to-work-with-mamp-mysql-on-leopard
[EDIT]:
I modified the right php.ini and everything's working fine now.
Now I get the following error:
[Exception]
DateTime::__construct(): It is not safe to rely on the system's timezone settings.
You are *required* to use the date.timezone setting or the date_default_timezone_set() function.
In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.
We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead
Here's the date.timezone config in php.ini
date.timezone = "Europe/Paris"
I'll try to figure it out myself but if any of you know how to fix it don't hesitate to comment on this. Thanks!
Doctrine - Error with command database:create or schema:update -f
The exception message tells you that doctrine can't login to your database host with username stats_crm
, because that role does not exist.
To fix that exception, you have to find the right username
that can get you in to the database server. Then, open your app/config/parameters.yml
, find node
named database_user
, and update it accordingly (and database_password
if necessary).
SQLSTATE[HY000] [2002] Not a directory when doctrine:schema:create
Create symlink from local mysql.sock to MAMP:
sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
sudo chown _mysql /var/mysql/mysql.sock
sudo chmod 777 /var/mysql/mysql.sock
Related Topics
How to Work with Many-To-Many Relations in Yii2
Checking for Empty Arrays: Count VS Empty
Php: Possible to Automatically Get All Posted Data and Multiple Checkbox Unchecked
Tracking Email with PHP and Image
How to Remove a Key and Its Value from an Associative Array
Examples of Vulnerable PHP Code
How to Post Multiple <Input Type="Checkbox" /> as Array in PHP
When to Generate a New Application Key in Laravel
What Are the Differences of System(), Exec() and Shell_Exec() in PHP
Why Use PHP Oop Over Basic Functions and When
Preserve and Display Text Exactly How It Is Typed and Submitted
Securing a Rest API Accessible from Android
What Is the Concept of Service Container in Laravel
Does PHP Close the File After the File Handler Is Garbage Collected