.ibd文件坏了怎么办?
.ibd文件坏了怎么办?接.frm文件坏了怎么办?http://blog.sina.com.cn/s/blog_5037eacb0102vlsy.html在5.6版本中使用vi修改了t3.ibd文件后,重新启动库 150527 18:03:44 mysqld_safe Starting mysqld daemon with databases from /data 2015-05-27 18:03:44 0 [Warning] Using unique option prefi...
通过连接的方式把数据文件放在别的地方
上篇写到通过create table data direcotry把数据文件放在别的地方。http://blog.itpub.net/25099483/viewspace-1662886/对于建立好的表同样以通过连接的方式把数据文件放在别的地方:mysql> use test;Reading table information for completion of table and column namesYou can turn off this feat...
建立用户之后,有了不该有的权限
mysql> grant select on aaa.t1 to 'user_a'@'%' identified by '123456'; Query OK, 0 rows affected (0.33 sec) [mysql@localhost ~]$ mysql -u user_a -p -h 127.0.0.1 Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2...
mysql中delete fro mysql.user where XX和drop user的不同
网友反映一个问题:删除用户之后,再建立一个一样的用户,原来用户的权限还在。为什么?让他重现过程,根据他的过程我在本机也可以重现:mysql> show databases; +--------------------+| Database |+--------------------+| information_schem...
对于performance_schema库show events时报 1044
网友遇到这个问题: 对于performance_schema库show events时报 1044 mysql> use performance_schema; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show events;&...
mysql释放文件高水位
释放文件高水位: 试试 delete 和 truncate是否会释放文件高水位 mysql> select version();+-------------------------------------------+| version() |+----------------------...
Using index condition Using index
Using index conditionTables are read by accessing index tuples and testing them first to determine whether to read full tablerows. In this way, index information is used to defer (“push down”) reading full table rows unless it isnecessary.通过索引访问表,看是否需要全表扫描,这时...
区分socket连接和tcp/ip连接
mysql连接时,如果使用了localhost,那么使用的是 socket连接。 感觉不应该是这个样子。今天测试:所以,并不是朋友说的那个样子。mysql@localhost ~]$ mysql -u sla -p -h 127.0.0.1 Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL co...
mysql trace optimizer
mysql> show variables like '%trace%';+------------------------------+----------------------------------------------------------------------------+| Variable_name | Value &n...
innodb_data_file_path初始化太大引起的错误
朋友升级了库,但是启库的时候 却报错了,根据他的报错猜想应该是innodb_data_file_path的问题,就把自己库的innodb_data_file_path初始化大小加大,报错如下,重现了朋友的错误2015-04-24 19:37:51 3628 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 4864 pages (rounded down t...
mysql_fix_privilege_tables 和mysql_upgrade
mysql_fix_privilege_tables 和mysql_upgrade今天朋友提到这个工具, 并且说这个是在升级的时候用到,升级权限表。我在5.6的文档中却没有找到这个在shell下, 也没有找到这个这是个什么东西啊,bing了一下,是有介绍这个东西,可是我这里却没有 。他的作用应该是和 mysql_...
mysql additional pool 指的是什么?
刚开始认为additional pool指的是 innodb_additional_mem_pool_size。但是看到下面的情况,让我有点 疑惑:mysql> show variables like '%additional%';+---------------------------------+---------+| Variable_name | Value ...
flush logs时做的操作
flush logs时做的操作: 对于一般查询日志和慢日志,先关闭文件再打开 对于binlog,关闭当前的,开始用下一个新的 用错误日志文件的话,先关闭再打开flush logs可以对一般查询日志,慢日志,错误日志 进行改名备份后重新生成文件(还是原来的名字) ...
INNODB监控开关
INNODB监控开关: 标准监控: 打开标准的innodb监控 CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB; 关闭标准的innodb监控 DROP TABLE innodb_monitor; 通过建表的方式会有一个告警信息: mysql> CREATE TABLE innodb_moni...
奇怪的现象
这样的你们见过过吗? why?mysql> show slave status\G;*************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: XXX...
shell中使用sudo不输入密码
shell中使用sudo不输入密码[mysql@localhost ~]$ cat aa.sh #!/bin/bash echo "password" | sudo -S cat /var/log/messages
mysql关闭过程
mysql关闭过程:1 开始关闭如果是客户端关闭的会,会建立一个shutdown的线程,如果是收到一个SIGTERM信号,那么他本身就是shutdown线程,也有可能创建一个。如果创建线程不能成功(例如,内存不足),会写一个错误日志Error: Can't create thread to kill server2 不再接受新的连接。3 中止当前的活动连...
使用skip-grant-tables启动库后不能执行grant语句
使用skip-grant-tables选项启动数据库时,不能执行 grant语句,可以对mysql.user表进行,update,delete,insert操作:[mysql@localhost ~]$ mysqld_safe --skip-grant-tables [mysql@localhost ~]$ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL conne...
sql mode 和用户自定义分区
SQL mode and user-defined partitioning. Changing the server SQL modeafter creating and inserting data into partitioned tables can cause major changesin the behavior of such tables, and could lead to loss or corruption of data. It isstrongly recommended that you never change the SQL mo...
主从环境中,从IO进程被停掉
主从环境中 ,如果主中的binlog已经被从读到中继日志,但是还没有被sql应用,这时从库上的从IO进程停掉了,sql进程仍然会把已经读到中继日志中的内容应用:也就是说这两个是独立的。例:在从库上 mysql> stop slave SQL_THREAD;Query OK, 0 rows affected (0.00 sec)...