2017年6月30日 星期五

brew php mcrypt

For Mac users you can install it via Homebrew
brew install mcrypt
and also
brew install homebrew/php/php70-mcrypt
for other versions of php try searching brew first
brew search mcrypt

from : https://laracasts.com/discuss/channels/general-discussion/use-of-undefined-constant-mcrypt-rijndael-128-assumed-mcrypt-rijndael-128?page=1

2017年6月29日 星期四

MacOSX homebrew reset mysql root password

If brew installed MySQL 5.7, the process is a bit different than for previous versions. In order to reset the root password, proceed as follows:
sudo rm -rf /usr/local/var/mysql
mysqld --initialize
A temporary password will be printed to the console and it can only be used for updating the root password:
mysql.server start
mysql -uroot -pTEMPORARY_PASSWORD
mysql> SET PASSWORD FOR '目標使用者'@'主機' = PASSWORD('密碼');
mysql> flush privileges;


from :
1)https://stackoverflow.com/questions/4359131/brew-install-mysql-on-mac-os/33924648#33924648
2)http://emn178.pixnet.net/blog/post/87659567-mysql%E4%BF%AE%E6%94%B9%E5%AF%86%E7%A2%BC%E8%88%87%E5%BF%98%E8%A8%98%E5%AF%86%E7%A2%BC%E9%87%8D%E8%A8%AD

Homebrew ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

When you got the server running via
mysql.server start
you should see the socket in /tmp/mysql.sock. However, the system seems to expect it in /var/mysql/mysql.sock. To fix this, you have to create a symlink in /var/mysql:
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock


from : https://stackoverflow.com/questions/15016376/cant-connect-to-local-mysql-server-through-socket-homebrew

After MySQL install via Brew, I get the error - The server quit without updating PID file

I found that it was a permissions issue with the mysql folder.
chmod -R 777 /usr/local/var/mysql/ 

from : https://stackoverflow.com/questions/9624774/after-mysql-install-via-brew-i-get-the-error-the-server-quit-without-updating

wibiya widget