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

mysql主从数据库操作

主:
show master status;
+-----------------+------------+-------------------+-----------------------+
| File                |
Position     | Binlog_Do_DB   | Binlog_Ignore_DB |
+-----------------+------------+-------------------+-----------------------+
|    log.000003
|           98  | repl                 |
mysql                    |
+-----------------+------------+-------------------+-----------------------+
从:
slave stop;
change master to
master_host='192.168.1.222',master_user='repl',master_password='123456',
master_log_file='log.000003' ,master_log_pos=98;
slave start;
show slave
status\G;
其它基本配置google一片


相关文档:

MySQL数据库备份和还原的常用命令【转】


MySQL数据库备份和还原的常用命令
原文见http://www.21andy.com/blog/20071102/655.html
时间:2007-11-02 23:29:09   类别:技术   访问:3,731 views   RSS 2.0   评论  
备份MySQL数据库的命令
mysqldump -hhostname -uusername -ppassword database ......

mysql sql 百万级数据库优化方案

1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。
2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎
放弃使用索引而进行全表扫描,如:
select id from t where num is null
可以在num上设置
默认值0,确保表中num列没有null值,然后这
样查询:
sel ......

优化MySQL数据库查询

优化MySQL数据库查询
 
   在优化查询中,数据库应用(如MySQL)即意味着对工具的操作与使用。使用索引、使用EXPLAIN分析查询以及调整MySQL的内部配置可达到优化查询的目的
  任何一位数据库程序员都会有这样的体会:高通信量的数据库驱动程序中,一条糟糕的SQL查询语句可对整个应用程序的运行产生严重的 ......

在mysql数据库中修改root的密码

下面我给大家介绍几种在mysql数据库中修改root密码的方法
方法一:
原始密码是 ckh
mysql -uroot -pckh
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 5.0.22-community-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
my ......

JAVA调用MYSQL存储过程

JAVA调用MYSQL存储过程
工程视图:
代码清单:
myconn.java
package org.apache.sh_mysql.test;
import java.sql.*;
public class MyConn {

private static final String DRIVER = "com.mysql.jdbc.Driver";
private static final String URL = "jdbc:mysql://localhost/test?useUnicode=true&characterEn ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号