易截截图软件、单文件、免安装、纯绿色、仅160KB

debian mysql 允许外部链接方法

1 modify the  /etc/mysql/my.cnf
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address           = 127.0.0.1
#
you see the bind-address, comment it. 注掉它。
2 update the database -- mysql.
shell > mysql -uroot -p
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| mysql              |
+--------------------+
5 rows in set (0.00 sec)
mysql> select t.host, t.user from user t;
+-----------+------------------+
| host      | user             |
+-----------+------------------+
|127.0.0.1 | debian-sys-maint |
|127.0.0.1 | james            |
| 127.0.0.1 | root             |
| debian    | root             |
| localhost | root             |
+-----------+------------------+
5 rows in set (0.00 sec)
mysql > update user set host='%' where user='yourUsername';
mysql > flush privileges;
remark:
if wanna create user please follow:
create user 'james'@'%' identified by 'password';


相关文档:

MySQL学习1


一、连接MYSQL
  格式: mysql -h主机地址 -u用户名 -p用户密码
  1、例1:连接到本机上的MYSQL。
  首先在打开DOS窗口,然后进入目录 mysqlbin,再键入命令mysql -uroot -p,回车后提示你输密码,如果刚安装好MYSQL,超级用户root是没有密码的,故直接回车即可进入到MYSQL ......

mysql学习5

修改和备份、批处理
   有时我们要对数据库表和数据库进行修改和删除,可以用如下方法实现:
1、增加一列:
如在前面例子中的mytable表中增加一列表示是否单身single:
mysql> alter table mytable add column single char(1);
2、修改记录
将abccs的single记录修改为“y”:
mysql> ......

MYSQL 相关

MYSQL where id in问题
SELECT * from product WHERE id IN (‘1522,1523,1524′)ORDER BY id DESC
在MYSQL里面执行这个语句只返回1522的值。
执行
SELECT * from product WHERE instr(‘1522,1523,1524′,id) ORDER BY id DESC
或者
SELECT * from product WHERE instr(‘1522,1523,1524 ......

mysql text和blob比较


1.
blob是二进制大对象,可以容纳可变量数量的数据,其中blob分为4中类型:TINYBLOB,BLOB,mediumblob和LongBlob,他们容纳的长度是不同的.
Text同样也分为四种类型:TINYTEXT、TEXT、MEDIUMTEXT和LONGTEXT
2.
blob被视为二进制字符串,Text被视为非二进制字符串;
blob列没有字符集,并且排序和比较基于列值字节的数值值。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号