前天给客户做一次数据库服务器的调整,把以前的一台主机废弃,一台从库提升为主,然后新加入其他从机,这里记录下操作步骤:
一、老主库开启只读,以便后面步骤出问题回滚回来:flush tables with read lock
二、110.10.1.102升级为主库,暂停同步,重置为主,清理中继信息,重启数据库
stop slave , reset master , mv ma...
分类:
数据库 时间:
2014-12-05 21:23:12
阅读次数:
266
常用的MySQL show 语句列举如下: 1.show databases ; // 显示mysql中所有数据库的名称 2.show tables [from database_name]; // 显示当前数据库中所有表的名称 3.show columns from table_name;// 显...
分类:
数据库 时间:
2014-12-04 19:56:35
阅读次数:
251
1.关闭正在运行的MySQL
2.启动MySQL的安全模式,命令如下:
mysqld --skip-grant-tables
or
mysqld-nd --skip-grant-tables
3.使用root用户[免密码]登陆MySQL
mysql -u root -p
输入密码时,直接回车
4.选择MySQL系统库
use mysql
5.查看当前系统用户...
分类:
数据库 时间:
2014-12-04 18:06:35
阅读次数:
176
How Many Tables
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 14683 Accepted Submission(s): 7187
Problem Description
Today is ...
分类:
其他好文 时间:
2014-12-04 17:58:44
阅读次数:
160
因为特殊需要,需要获取dbf数据库中的表的名称。现有 如下解决办法 1 public List GetTableFields(string path) 2 { 3 List tables = new List(); 4 ...
分类:
数据库 时间:
2014-12-04 10:02:36
阅读次数:
198
select TABLE_NAME,UPDATE_TIME from information_schema.TABLES where TABLE_SCHEMA='数据库名' order by UPDATE_TIME desc limit 1;select TABLE_NAME,UPDATE_TIME...
分类:
数据库 时间:
2014-12-03 20:58:22
阅读次数:
401
参数说明:1.Tables :表名称,视图2.PrimaryKey :主关键字3.Sort :排序语句,不带Order By 比如:NewsID Desc,OrderRows Asc4.CurrentPage :当前页码5.PageSize :分页尺寸6.Filter :过滤语句,不带Where7....
分类:
其他好文 时间:
2014-12-02 16:35:00
阅读次数:
122
public class JsonUtil{public string ToJson(DataSet dataSet){string jsonString = "{";foreach (DataTable table in dataSet.Tables){jsonString += """" + t...
分类:
Web程序 时间:
2014-12-02 14:52:04
阅读次数:
126
无密码登陆:sys as sysdba
查看当前的所有数据库:select */name from v$database;
查看当前数据库连接用户:show user
查看当前数据所有表:select table_name from all_tables;
查看结构:如表结构:desc table1 --需在命令窗口模式下
新建数据库用户:...
分类:
数据库 时间:
2014-12-02 11:54:22
阅读次数:
160
Understanding Joins1.Joins combine tables horizontally (side by side) by combining rows. The tables being joined are not required to have the same num...
分类:
数据库 时间:
2014-12-01 20:49:54
阅读次数:
439