不灭的火

革命尚未成功,同志仍须努力下载JDK17

作者:AlbertWen  添加时间:2014-07-17 22:38:31  修改时间:2025-04-19 08:16:45  分类:MySQL/Redis  编辑

同时打开2个命令行窗口,并按如下操作:

<1>.在第一个“命令行窗口”输入:

net stop mysql

cd  D:\Program Files\MySQL\MySQL Server 5.5\bin

mysqld --skip-grant-tables

 

作者:AlbertWen  添加时间:2012-10-21 15:23:27  修改时间:2025-04-29 00:18:50  分类:MySQL/Redis  编辑

当服务器没有运行PHP、没装phpMyAdmin的时候,远程管理MySQL就显得有必要了。

第一步:开启MySQL用户的远程访问权限

mysql -u root -p mysql # 第1个mysql是执行命令,第2个mysql是系统数据名称
作者:AlbertWen  添加时间:2017-10-27 19:48:09  修改时间:2025-04-19 09:03:14  分类:MySQL/Redis  编辑

作者:AlbertWen  添加时间:2014-07-14 23:12:33  修改时间:2025-04-23 10:13:37  分类:MySQL/Redis  编辑

准备把以前的非集群版MySQL数据导入到MySQL Cluster中,出现 

'No more attribute metadata records (increase MaxNoOfAttributes)' from NDBCLUSTER 

的错误,如下图所示:(注:数据表引擎已改为 ENGINE=ndbcluster

作者:AlbertWen  添加时间:2017-10-29 08:59:45  修改时间:2025-04-19 07:54:58  分类:MySQL/Redis  编辑

今天碰到数据库出错:

Got error 28 from storage engine

查了一下,数据库文件所在的盘应该没事,应该是数据库用的临时目录空间不够

作者:AlbertWen  添加时间:2014-09-20 11:46:17  修改时间:2025-04-30 01:33:23  分类:MySQL/Redis  编辑

几个常用操作:

# 只导出表结构

d:/PHP/xampp/mysql/bin/mysqldump -h127.0.0.1 -uroot -p123456 snsgou_sns_test --no-data --default_character-set=utf8 > d:/Python/data/snsgou_sns_test_table.sql

作者:AlbertWen  添加时间:2013-07-26 17:35:24  修改时间:2025-04-23 23:41:35  分类:MySQL/Redis  编辑

MySQL手册中find_in_set函数的语法:

FIND_IN_SET(str, strlist) 

假如字符串str 在由N 子链组成的字符串列表strlist 中,则返回值的范围在 1 到 N 之间。 

作者:AlbertWen  添加时间:2013-07-26 22:45:13  修改时间:2025-04-19 10:49:45  分类:MySQL/Redis  编辑

select id, list, name from table where 'daodao' IN (list); (一)

select id, list, name from table where 'daodao' IN ('libk', 'zyfon', 'daodao'); (二)

select id, list, name from table where FIND_IN_SET('daodao',list); (一)的改进版。

作者:AlbertWen  添加时间:2016-02-15 18:15:07  修改时间:2025-04-30 19:23:46  分类:MySQL/Redis  编辑

问题描述:

MySQL 中带有反斜杠的内容入库后,发现反斜杠无故失踪了(俗话说被吃掉了)

例:插入

insert into tb('url') values ('absc\eeee');

结果数据库里的内容是:absceeee(反斜杠没了呢)

作者:AlbertWen  添加时间:2015-08-09 12:22:28  修改时间:2025-04-26 19:29:40  分类:MySQL/Redis  编辑

REPLACE的运行与INSERT很相似。只有一点例外,假如表中的一个旧记录与一个用于PRIMARY KEY或一个UNIQUE索引的新记录具有相同的值,则在新记录被插入之前,旧记录被删除。注意:除非表有一个PRIMARY KEY或UNIQUE索引,否则,使用一个REPLACE语句没有意义。该语句会与INSERT相同,因为没有索引被用于确定是否新行复制了其它的行。