mysql的常用工具
[root@dba ~]# myisampackmyisampack Ver 1.23 for Linux on x86_64Copyright 2002-2008 MySQL AB, 2008 Sun Microsystems, Inc.This software comes with ABSOLUTELY NO WARRANTY. This is free software,and you are welcome to modify and redistribute it under the GPL license
mysql sql mode及相关问题
<p>mysql> select @@sql_mode;<br />+--------------------------------------------+<br />| @@sql_mode |...
mysql分布式事务控制
<p>sesson 1:</p><p>mysql> select * from t;<br />+------+--------------------------+----------------------------------+<br />| id | context | hash_value ...
mysql存储过程
<p>select * from information_schema.routines</p><p><br /></p><p>mysql> desc information_schema.routines;<br />+--------------------------+---------------------+------+-----+---------------------+-------+<br />| Field &nb...
Mysql的视图
<p>select * from information_schema.VIEWS</p><p><br /></p><p>mysql> desc information_schema.VIEWS;<br />+----------------------+--------------+------+-----+---------+-------+<br />| Field |...
mysql的字符集设置
<p>字符集:<br />mysql> show character set;<br />+----------+-----------------------------+---------------------+--------+<br />| Charset | Description | Default collation | Maxl...
sql where in list问题
ITPUB技术丛书 剑破冰山 170页Where in list问题还是挺常见的。前台可能传过来一系列参数,JAVA可能将其拼接在In列表里面.比较典型的场景是前台页面有一堆复选框,系统需要显示用户勾选的数...
选择合适的数据类型
mysql> drop table vc;Query OK, 0 rows affected (0.03 sec)mysql> create table vc(v varchar(4),c char(4));Query OK, 0 rows affected (0.04 sec)mysql> insert into vc values('ab ','ab ');Query OK, 1 row affected (0.01 sec)mys...
mysql的存储引擎
mysql> show variables like '%storage_engine%';+----------------------------+--------+| Variable_name | Value |+----------------------------+--------+| default_storage_engine | InnoDB ||...
mysql的文件
rpm包安装:[root@dba mysql]# pwd/usr/share/mysql[root@dba mysql]# ls -l *.cnf-rwxr-xr-x 1 root root 1126 1月 19 22:07 my-default.cnf[root@dba mysql]# cat my-default.cnf # For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-de...
mysql常用的函数
mysql> select curdate(),curtime(),now();+------------+-----------+---------------------+| curdate() | curtime() | now() |+------------+-----------+---------------------+| 2015-07-16 | 11:52:59 | 201...
mysql中的运算符
mysql> select ~1;+----------------------+| ~1 |+----------------------+| 18446744073709551614 |+----------------------+1 row in set (0.00 sec)mysql> select ~1,~18446744073709551614...
mysql帮助的使用
mysql> ? contents;You asked for help about help category: "Contents"For more information, type 'help <item>', where <item> is one of the followingcategories: Account Management Administration Compound Statements Data Definition Da...
mysql的数据类型
create table test.sales (id int auto_increment not null,date datetime not null,cost int unsigned not null,primary key (id));mysql> ALTER TABLE test.sales DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;Query OK, 0 rows affected (0.04 sec)Records: 0 Duplicates: 0 War...
mysql修改root用户密码的方法
遇到以下错误:[root@dba ~]# mysql -uroot -pEnter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决方案:1、关闭原有的数据库:[root@dba ~]# /etc/init.d/mysql stopShutting down MySQL.... SUCCESS2、以特殊的模式启动数据库:[roo...
mysql的rpm包安装
1、准备好安装包:[root@dba ~]# ll总用量 75916-rw-------. 1 root root 1647 6月 24 11:29 anaconda-ks.cfg-rw-r--r--. 1 root root 45675 6月 24 11:29 install.log-rw-r--r--. 1 root root 10033 6月 24 11:27 install.log.s...
shell循环
例子10-1 一个简单的例子:#!/bin/bash# 列出所有的行星名称.for planet in Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Plutodo echo $planet # 每个行星被单独打印在一行上.doneechofor planet in "Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto"# 所...
dblink对索引的影响
如下查询: a,b表做过同义词 ,都是通过dblink查询的 sql1 : SQL code select a.name b.* from a, b where a.id = b.id where b.mtime < to_date('20050501','yyyy-mm-dd') group by a.name --0.1s内出结果...
linux shell学习笔记1
例子 2-1. cleanup: 一个清空/var/log目录下的日志文件的脚本#Cleanup# 必须以root用户运行. cd /var/log cat /dev/null > messages cat /dev/null > wtmp echo "Logs cleaned up."[root@dba shell]# ./2_1.sh Logs cleaned up.例子 2-2. cleanup: 一个改进版的cleanup脚本...
ORACLE LINUX VNC配置
[root@dba ~]# yum -y install gtk-vnc*Loaded plugins: refresh-packagekit, securitySetting up Install ProcessResolving Dependencies--> Running transaction check---> Package gtk-vnc.x86_64 0:0.3.10-3.el6 will be installed---> Package gtk-vnc-python.x86_64 0:0.3.10-3.el6 will be installed--> Fi...