mysql on mac and linux一些设置

mysql 安装在 usr/local/mysql 下面,是隐藏的。而且要更改中文编码 要在 /etc 里面加my.cnf

ubuntu:
mysql 在 /etc/mysql下面,如果想要允许远程连接,你需要注释掉my.cnf 里面的一段话
bind-address:127.0.0.1
否则远程连接会报  61 的错
上面的解决了如果出现 xxx is not allowed to connect to this mysql server ,那么你要打开你的权限
On your server run mysql from command line:
mysql -u root -p -h localhost -P 3306
Then run this command in mysql shell:

>use mysql
>GRANT ALL ON *.* to root@'%' IDENTIFIED BY 'pass';
>FLUSH PRIVILEGES;

其实你发现就是修改的 mysql 自带的 数据库(mysql)里面的 user 表 记录




就可以连接上了

猜你喜欢

转载自ycljf86.iteye.com/blog/2279221