# 数据库

# Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server

MySQL服务器,使用ip连接或telnet提示not allowed to connect to this MySQL Server

该问题一般是由于安全设置引起的,只允许在localhost上访问。

解决方法为新建一个管理员账户,对指定数据库开启任意主机访问。

参考:http://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-serveropen in new window

mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
->     WITH GRANT OPTION;
mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
->     WITH GRANT OPTION;
1
2
3
4
5
6

# 检查Mysql进程资源占用高的方法

mysqladmin -uroot -p密码 processlist
1

# MSSQL 数据库错误代码

  • 9001

    重启数据库服务,将数据库的自动关闭设置为False

# 查看Mysql二进制日志的方法

mysqlbinlog /usr/local/mysql/var/mysql-bin.000001
1
Last Updated: 2021/6/15下午4:54:23
Contributors: Derek.S