posted @ 2018-09-21 15:08
随笔分类 - MySQL
摘要:ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'。 原因是:mysql数据库的user表里,存在用户名为空的账户即匿名账户,导致登录的时候是虽然用的是root,但实际是匿名登录的,通过错误提示里
阅读全文
摘要:查询所有数据库占用磁盘空间大小的SQL语句: 语句如下 1 2 3 4 5 select TABLE_SCHEMA, concat(truncate(sum(data_length)/1024/1024,2),' MB') as data_size, concat(truncate(sum(inde
阅读全文
posted @ 2018-06-14 16:28
摘要:Introduction Using GetSqlStringCommand with a text comparative, with LIKE, in ADO.NET and the MySQLParamenter gets you different result between execut
阅读全文
posted @ 2018-01-05 10:06
摘要:mysql字符集的问题: mysql的表格整理应该改为gbk_chinese_ci,每个需要汉字的字段属性的整理也改为gbk_chinese_ci,
阅读全文
posted @ 2017-08-08 15:31
摘要:using System;using System.Collections.Generic;using System.Text;using Console = System.Console;using Microsoft.Data.Odbc;using System.Data;using Syste
阅读全文
posted @ 2017-06-21 11:10
摘要:MySQL中的ROWNUM的实现 MySQL 几乎模拟了 Oracle,SQL Server等商业数据库的大部分功能,函数。但很可惜,到目前的版本(5.7)为止,仍没有实现ROWNUM这个功能。
阅读全文
posted @ 2017-03-23 09:30
摘要:在做项目的时候需要些分页,用的数据库是MySQL,之前看到的参考例子是用MS SQL做的,在MS SQL、Oracle里面有ROW_NUMBER() OVER函数可以在数据库里对数据进行分组。百度后的结论总结如下: (一)先说下在mysql里面分页时的sql语句,转载自http://topic.cs
阅读全文
posted @ 2017-03-23 09:22