mysql avg 报错_MySQL报错汇总
1、Every derived table must have its own alias
解釋:這句話的意思是每個派生出來的表必須有一個自己的別名。一般是在多表查詢或者子查詢的時候會出現(xiàn)這個錯誤,因為在嵌套查詢中,子查詢的結(jié)果是作為一個派生表給上一級進行查詢,所以子查詢的結(jié)果必須有一個別名。
解決:查詢語句由
SELECT * from
(
select e.account from employee e
UNION
SELECT u.account from ‘user’ u
UNION
SELECT a.account from agent a
)
變?yōu)?/p>
SELECT * from
(
select e.account from employee e
UNION
SELECT u.account from ‘user’ u
UNION
SELECT a.account from agent a
)as total
如上所示,在子查詢的后面增加一句 as total,相當(dāng)于給子查詢的結(jié)果集派生表取別名為total,問題就解決了。
2、ERROR 1114 (HY000):TABLE xxx IS FULL
解釋:這里的table is full指的不是內(nèi)存表的空間限制,而是myisam或者aria引擎。
解決:
查看創(chuàng)建表格的日志文件(表結(jié)構(gòu))
show create table xxx\G
show table status like ‘xxx’\G
更改表平均行長度與最大行數(shù):
alter table xxx avg_row_length=2000;
alter table xxx max_rows=100000000000;
接著就可以繼續(xù)load data了。
PS:以后大家建立用來存放大量日志類型的數(shù)據(jù)表時,應(yīng)該下意識的加上max_row_size參數(shù)。
3、ERROR 1297 (HY000): Got temporary error 410 ‘REDO log files overloaded (decrease TimeBetweenLocalCheckpoints or increase
NoOfFragmentLogFiles)’ from NDBCLUSTER
解釋:在線添加節(jié)點后使用alter online table Billinfo reorganize partition;命令 將表數(shù)據(jù)在數(shù)據(jù)節(jié)點上重新分配時報錯:
解決:
調(diào)整管理節(jié)點上的config.ini配置文件里[ndbd default]下的TimeBetweenLocalCheckpoints 值和 FragmentLogFileSize 值
TimeBetweenLocalCheckpoints 參數(shù):
Default value = 20
Changed it to TimeBetweenLocalCheckpoints =6
Setting TimeBetweenLocalCheckpoints to 6 or less means that local checkpoints will be executed continuously without pause, independent of the cluster’s workload.
FragmentLogFileSize 參數(shù):
Default value = 16M
Changed it to FragmentLogFileSize=256M
Setting this parameter allows you to control directly the size of the redo log files. This can be useful in situations when MySQL Cluster is operating under a high load and it is unable to close fragment log files quickly enough before attempting to open new ones. Increasing the size of the fragment log files gives the cluster more time before having to open each new fragment log file.
4、ERROR 1297 (HY000): Got temporary error 4010 ‘Node failure caused abort of transaction’ from NDBCLUSTER,
解釋:插入時數(shù)據(jù)節(jié)點強制關(guān)閉。
**解決:**MaxNoOfConcurrentTransactions和MaxNoOfConcurrentOperations參數(shù)
5、ERROR 1297 (HY000) at line 1872: Got temporary error 410 ‘REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or incre’ from NDBCLUSTER
**解決:**Modify / Add parameter TimeBetweenLocalCheckpoints in your config.ini.
Default value = 20
Changed it to TimeBetweenLocalCheckpoints =6
Setting TimeBetweenLocalCheckpoints to 6 or less means that local checkpoints will be executed continuously without pause, independent of the cluster’s workload.
**6、**error 2815: ‘File not found(Ndbd file system inconsistency error, please report a bug). Ndbd file system error, restart node initial’.
解決:增大config.ini文件中的NoOfFragmentLogFiles 和 RedoBuffer 參數(shù)
**7、**Status:Temporary error,restart node
Message:System error,node killed during node restart by other node (Internal error,programming error or missing error message, please report a bug)
Error:2303 Error data:Node 12 killed this node because GCp stop was detected
Error object:NDBCNTR (Line:273)Ox000006
解釋:這個問題是因為undo日志空間文件 用完了。
解決:增加 undo日志空間文件 ,語法如下 alter logfile group lg_1 add undofile ‘undo_2.log’ initial_size 1024M engine ndbcluster;
總結(jié)
以上是生活随笔為你收集整理的mysql avg 报错_MySQL报错汇总的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql协议重传_TCP协议详解
- 下一篇: tomcat apache mysql_