2020年05月02日
⁄ 数据库
⁄ 共 71字
在的配置文件my.cnf中
[mysqld]
节点添加下面两行
skip-host-cache
skip-name-resolve
作者 starxing
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 1348字
message from server: "Host 'xxx' is not allowed to connect to this MySQL server的解决
解决方法:
1. 改表法。
可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 里的 "user" 表里的 "host" 项,从"localhost"改称"%"
-u ...
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 202字
在安装MySQL的某一步中勾选了“Add firewall exception for this port”,但是你服务器的Windows的防火墙又没有开启,所以会有这个提示,一般情况下点击OK就好了,不会产生什么系统错误。
Windows server 2003 正版系统默认是没有开启Windows防火墙的,某些原版盗版也是没有开启的,不建议大家使用各种美化、修改过的Windows server 类系统。毕竟这是服务器。
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 4382字
错误 信息:
> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: IP
Master_User: repl
Master_Port: 3306
Connect_Retry: 30
Master_Log_File: mysql-bin.x
Read_Master_Log_Pos: pos_x
Relay_Log_File: relay-bin.y
Relay_Log_Pos: pos_y
Relay_Master_Log_File: mysql-bin.z
Slave_IO_Running: Yes
...
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 3479字
录制程序有一功能:将录制的文件信息写入MySQL,供BS系统查询。
因此封装了一个MySQL类,进行数据库操作。
主要接口为Update():执行SQL语句。
现在问题来了:
(一)在某个场景下,我们在向table1中insert一条记录后,需要得到得到它的ID,然后update与之匹配的另一张表table2中的记录。由于insert本身并不返回结果集,因此我们无法直接得到插入记录的ID。
那该怎么办呢?
之前从BS...
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 780字
本文实现了MySQL的随机数、MySQ随机选取数据、MySQ随机查询数据、MySQ随机更新数据。
MySQ随机查询数据
以前在群里讨论过这个问题,比较的有意思.mysql的语法真好玩.他们原来都想用PHP的实现随机,但取出多条好像要进行两次以上查询.翻了手册,找到了下面这个语句,可以完成任务了。
SELECT * FROM table_name ORDER BY rand() LIMIT 5;
MySQL的rand()函数在手册里是这么说的:
RAND()
RAND(N)
...
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 1024字
the security settings could not be applied to the database (error 1045 MySQL)的解决
在装时,总是到最后启动的时候出错,出错内容如下:
就是最后的Apply security setting过不去
提示:
The security settings could not be applied to the database because the connection has failed with the following error. www.2cto.com
Error Nr. 1045
Ac...
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 451字
linux下启动出现Can't connect to local MySQL server through socket的问题
问题: linux下mysql启动问题! Can't connect to local MySQL server through socket
解决方案:(我的解决方案成功了!其它情况就参照一下吧!嘿嘿。。。)
Ruby代码
<span style="font-size: x-large;">首先:cp /usr/share/doc/MySQL-server-5.5.24/my-medium.cnf /etc/my.cn...
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 326字
MYSQL5.x在下是默认以‘strict mode’工作的,当建表语句中有类似:
description TEXT DEFAULT 'www.naozao.com'语句时,会给你一个错误或者警告信息
BLOB/TEXT column 'description' can't have a default value query
解决方法:
第一种. 去掉DEFAULT 'www.naozao.com'
第二种. 找到安装根目录下的my.ini文件并注释掉sql-mode="STRICT_TRANS_TABLES,NO...
[db:关键字]阅读全文
2020年05月02日
⁄ 数据库
⁄ 共 1267字
报错:1130-host ... is not allowed to connect to this MySql server
解决方法:
1。 改表法。
可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 里的 "user" 表里的 "host" 项,从"localhost"改称"%"
-u root -pvmwaremysql>use mysql;
mysql>update user set host = '%' w...
[db:关键字]阅读全文