memo.xight.org

日々のメモ

homebrew で nginx + phpmyadmin

Install

brew install phpmyadmin

/usr/local/etc/nginx/sites-available/phpmyadmin.localhost

server {
	listen       8000;
	server_name  phpmyadmin.localhost;

	root  /usr/local/share/phpmyadmin;
	index index.php;

	access_log /usr/local/var/log/nginx/phpmyadmin.localhost/access_log;
	error_log  /usr/local/var/log/nginx/phpmyadmin.localhost/error_log;

	location ~ \.php$ {
		fastcgi_pass   127.0.0.1:9000;
		fastcgi_index  index.php;
		fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
		include        fastcgi_params;
	}
}

パスワード無しでログインしたい場合

cd /usr/local/share/phpmyadmin
cp config.sample.inc.php config.inc.php

/usr/local/share/phpmyadmin/config.inc.php

$cfg['Servers'][$i]['AllowNoPassword'] = true;