1.登陆Mysqlmysql -u root -p2.允许任何IP访问,其中密码为admingrant all privileges on *.* to root@"%" identified by "admin" with grant option;3.允许特定IP访问,其中密码为admingra... ...
分类:
数据库 时间:
2017-09-28 13:02:42
阅读次数:
141
sql语句有几种写法 1:SELECT * FROM tablename ORDER BY RAND() LIMIT 想要获取的数据条数; 2:SELECT *FROM `table` WHERE id >= (SELECT FLOOR( MAX(id) * RAND()) FROM `table` ...
分类:
数据库 时间:
2017-09-27 20:50:33
阅读次数:
206
在mysql中如果想要查看表的定义的话;有如下方式可供选择 1、show create table 语句: 2、desc table_name 语句: 由这个例子可以看出: Field:字段表示的是列名 Type:字段表示的是列的数据类型 Null :字段表示这个列是否能取空值 Key :在mysq ...
分类:
数据库 时间:
2017-09-27 18:59:17
阅读次数:
252
慢查询日志概念 原文:http://www.cnblogs.com/kerrycode/p/5593204.html MySQL的慢查询日志是MySQL提供的一种日志记录,它用来记录在MySQL中响应时间超过阀值的语句,具体指运行时间超过long_query_time值的SQL,则会被记录到慢查询日 ...
分类:
数据库 时间:
2017-09-27 17:38:45
阅读次数:
427
ms_sql:convert(datetime,'2010-11-13')cast('2017-01-01' as datetime)Oracle:to_date('2017-01-01')mysql:date_format('2017-01-01','%Y-%c-%d') ...
分类:
数据库 时间:
2017-09-27 16:13:05
阅读次数:
179
1.安装mysq apt-get install mysql-server mysql-client 安装的过程会有一个框,输入sql密码,按TAB切换到ok 2.安装apache2 apt-get install apache2 3.安装php PS:大多数文章都是安装php5,而php5好像是找 ...
分类:
系统相关 时间:
2017-09-27 16:12:56
阅读次数:
289
环境: Linux CentOS release 6.9 CentOS7 min 均适用 mysql Community Server 5.6.37 安装 1、创建组和用户 2、将下载好的mysql包上传至/usr/local目录下 附下载地址:https://cdn.mysql.com//Down ...
分类:
数据库 时间:
2017-09-27 13:29:51
阅读次数:
287
Implement int sqrt(int x). Compute and return the square root of x. using only integer division for the Newton method works ...
分类:
其他好文 时间:
2017-09-26 23:36:16
阅读次数:
221
转自 http://blog.itpub.net/22664653/viewspace-1673682 【MySQL】MySQL5.6新特性之Multi-Range Read 2015-05-27 14:13:09 分类: MySQL 一 介绍 MySQL 5.6版本提供了很多性能优化的特性,其中之 ...
分类:
数据库 时间:
2017-09-26 22:32:00
阅读次数:
238
MySql数据库--mysql_real_escape_string()函数 来自:http://www.cppblog.com/woaidongmao/archive/2009/08/13/93154.html unsigned long mysql_real_escape_string(MYSQ ...
分类:
数据库 时间:
2017-09-26 22:24:48
阅读次数:
156