mysql.sock

Doctrine 2 command line tool; MAMP and mysql.sock

送分小仙女□ 提交于 2020-01-01 07:21:34
问题 I grabbed the CI2/Doctrine2 from Wildly Inaccurate. I'm trying to start using it, but before I'm actually getting to work with it, I wanted to make sure everything works. However, when I try the command line tool, I run into the following error: $ ./doctrine orm:schema-tool:create ATTENTION: This operation should not be executed in a production environment. Creating database schema... Warning: PDO::__construct(): [2002] Socket operation on non-socket (trying to connect via unix:///var/mysql

mysql.sock is not created OSX

梦想与她 提交于 2019-12-30 08:53:19
问题 I run mysql on OSX, now when I restart my computer it does not create the mysql.sock, meaning that all my connections gives me a error 2002. anyone knows how to prevent this? 回答1: I had this same issue on Snow Leopard, the socket spawns in the wrong location for some reason on OS X. To get the socket spawning in the correct location: create a new file "my.cnf" in /etc with the following lines: [mysqld] socket=/var/mysql/mysql.sock [client] socket=/var/mysql/mysql.sock and restart mysqld: sudo

mysql.sock is not created OSX

試著忘記壹切 提交于 2019-12-30 08:52:29
问题 I run mysql on OSX, now when I restart my computer it does not create the mysql.sock, meaning that all my connections gives me a error 2002. anyone knows how to prevent this? 回答1: I had this same issue on Snow Leopard, the socket spawns in the wrong location for some reason on OS X. To get the socket spawning in the correct location: create a new file "my.cnf" in /etc with the following lines: [mysqld] socket=/var/mysql/mysql.sock [client] socket=/var/mysql/mysql.sock and restart mysqld: sudo

Database connection “Mysql” is missing and mysql.sock is missing

核能气质少年 提交于 2019-12-30 08:43:08
问题 I was trying to generate model code from cake command line tool. But got this issue. Warning Error: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in [/Users/test/Google_WWW/project_name/lib/Cake/Model/Datasource/Database/Mysql.php, line 177] Error: Database connection "Mysql" is missing, or could not be created. (although it's showing that mysql database is connected at localhost in cakephp directory) I'm using MAMP. I searched a lot

Database connection “Mysql” is missing and mysql.sock is missing

天涯浪子 提交于 2019-12-30 08:41:31
问题 I was trying to generate model code from cake command line tool. But got this issue. Warning Error: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in [/Users/test/Google_WWW/project_name/lib/Cake/Model/Datasource/Database/Mysql.php, line 177] Error: Database connection "Mysql" is missing, or could not be created. (although it's showing that mysql database is connected at localhost in cakephp directory) I'm using MAMP. I searched a lot

Can't connect to local MySQL server through socket tmp/mysql.sock

霸气de小男生 提交于 2019-12-25 18:16:53
问题 Having just tried to access some mysqladmin privileges within terminal (flush_hosts), I have noticed that the socket problem has resurfaced with the error Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)*. I have no servers running currently. How can this be solved? 回答1: Wow, yourself mentioned, you 'must' run a server that can to connect it,Please consider: root@debian:/etc/init.d# /etc/init.d/mysql stop [ ok ] Stopping MySQL database server: mysqld. root@debian:/etc

Yosemite - MAMP - Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)

无人久伴 提交于 2019-12-21 03:42:31
问题 I have problem when I try to connect to MySQL MAMP : ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) I'm doing research but I have not found a solution to my problem, I try to link mysql.sock like this : sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock But, the file /tmp/mysql.sock doesn't exist. Do you have any ideas ? The problem is blocking me for 2 days, I searched for this time but nothing good for me.

mysql_connect(): [2002] No such file or directory

非 Y 不嫁゛ 提交于 2019-12-06 12:18:19
在mac中搭建php的开发环境 1. apach ---- 推荐用MAMP。你只要把你的php文件/项目放入到htdocs(/Applications/MAMP/ htdocs )目录下,启动mamp,输入localhost就可以直接看见你这个目录下的所有文件了。--由于这种相对简单,这里不再赘述,如果任何问题,欢迎联系交流。 2. nginx ---- 由于没有已经集成的工具,nginx相对apach的配置相对复杂。比如你需要下载mysql,下载php-fpm,甚至还需要用homebrew来安装。(我下面的说明都是基于homebrew安装的情况)在这里我简单的说明几点需要特别注意的情况: 2.1 nginx的配置 需要说明的是 /usr/local/etc/nginx下的 conf文件server的配置,fastcgi_param选项,注意当加上$document_root, 如下面所示:实际上,下面的$document_root$fastcgi_script_name;是和fastcgi.conf里面的值一致。 server { listen 80; server_name localhost; //指定你的域名 #charset koi8-r; #access_log logs/host.access.log main; location / { root /Users

MySQL hell… can't connect to database /tmp/mysql.sock

ⅰ亾dé卋堺 提交于 2019-12-06 05:33:47
问题 Update: I've STOPPED the older mysql process which was running and causing some confusion. Now I think I have only the newer (5.1.40) version running. BUT, it's pointing to the wrong data file. It's pointing to a default install data file and I'd like it to point to the existing data file in /var/mysql . Here's a portion of /etc/my.cnf # The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 socket = /var/mysql/mysql.sock # Here follows

Missing mysql.sock; yielding OperationalError: (2002, “Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)”)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 18:07:55
问题 Firstly, I swear that I have looked at every single question that references this error. Nearly every solution someone offers is different, and no one seems to understand the systemic reasons for the error. What I, and many people on the web who encounter this common problem, need, is an explanation of what is actually going wrong. Basically, when I try to run: python manage.py shell from django.db import connection cursor = connection.cursor() with Django 1.4 and python 2.7.3, I get the