免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5800 | 回复: 2
打印 上一主题 下一主题

mysql 5.1 [ERROR] Invalid (old?) table or database name '.ssh' 如何处理? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-01-14 09:47 |只看该作者 |倒序浏览
本帖最后由 cormywang 于 2014-01-14 09:47 编辑

mysql版本:
  1. # mysql -V
  2. mysql  Ver 14.14 Distrib 5.1.61, for redhat-linux-gnu (x86_64) using readline 5.1
  3. #
复制代码
mysql配置文件
  1. # cat /etc/my.cnf
  2. # Example MySQL config file for medium systems.
  3. #
  4. # This is for a system with little memory (32M - 64M) where MySQL plays
  5. # an important part, or systems up to 128M where MySQL is used together with
  6. # other programs (such as a web server)
  7. #
  8. # MySQL programs look for option files in a set of
  9. # locations which depend on the deployment platform.
  10. # You can copy this option file to one of those
  11. # locations. For information about these locations, see:
  12. # http://dev.mysql.com/doc/mysql/en/option-files.html
  13. #
  14. # In this file, you can use all long options that a program supports.
  15. # If you want to know which options a program supports, run the program
  16. # with the "--help" option.

  17. # The following options will be passed to all MySQL clients
  18. [client]
  19. #password       = your_password
  20. port            = 3306
  21. socket          = /var/lib/mysql/mysql.sock

  22. # Here follows entries for some specific programs

  23. # The MySQL server
  24. [mysqld]
  25. memlock
  26. port            = 3306
  27. socket          = /var/lib/mysql/mysql.sock
  28. basedir = /usr
  29. datadir = /var/lib/mysql
  30. skip-external-locking
  31. key_buffer_size = 1G
  32. max_allowed_packet = 100M
  33. table_open_cache = 512
  34. sort_buffer_size = 1G
  35. net_buffer_length = 10M
  36. read_buffer_size = 1G
  37. read_rnd_buffer_size = 1G
  38. myisam_sort_buffer_size = 1G
  39. join_buffer_size = 1G
  40. tmp_table_size = 512M
  41. max_heap_table_size = 512M
  42. init_connect = SET collation_connection = utf8_general_ci
  43. init_connect = SET NAMES utf8
  44. init-connect = 'insert into accesslog.accesslog values(connection_id(), now(), user(), current_user());'
  45. init-connect = set autocommit=0
  46. character-set-server = utf8
  47. collation-server = utf8_general_ci
  48. skip-character-set-client-handshake
  49. skip-name-resolve
  50. max_binlog_size = 1G
  51. long_query_time = 10
  52. slow_query_log
  53. slow_query_log_file = /var/lib/mysql/slow_query.log


  54. # Don't listen on a TCP/IP port at all. This can be a security enhancement,
  55. # if all processes that need to connect to mysqld run on the same host.
  56. # All interaction with mysqld must be made via Unix sockets or named pipes.
  57. # Note that using this option without enabling named pipes on Windows
  58. # (via the "enable-named-pipe" option) will render mysqld useless!
  59. #
  60. #skip-networking

  61. # Replication Master Server (default)
  62. # binary logging is required for replication
  63. log-bin=mysql-bin

  64. # binary logging format - mixed recommended
  65. binlog_format=mixed

  66. # required unique id between 1 and 2^32 - 1
  67. # defaults to 1 if master-host is not set
  68. # but will not function as a master if omitted
  69. server-id       = 1

  70. # Replication Slave (comment out master section to use this)
  71. #
  72. # To configure this host as a replication slave, you can choose between
  73. # two methods :
  74. #
  75. # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
  76. #    the syntax is:
  77. #
  78. #    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
  79. #    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
  80. #
  81. #    where you replace <host>, <user>, <password> by quoted strings and
  82. #    <port> by the master's port number (3306 by default).
  83. #
  84. #    Example:
  85. #
  86. #    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
  87. #    MASTER_USER='joe', MASTER_PASSWORD='secret';
  88. #
  89. # OR
  90. #
  91. # 2) Set the variables below. However, in case you choose this method, then
  92. #    start replication for the first time (even unsuccessfully, for example
  93. #    if you mistyped the password in master-password and the slave fails to
  94. #    connect), the slave will create a master.info file, and any later
  95. #    change in this file to the variables' values below will be ignored and
  96. #    overridden by the content of the master.info file, unless you shutdown
  97. #    the slave server, delete master.info and restart the slaver server.
  98. #    For that reason, you may want to leave the lines below untouched
  99. #    (commented) and instead use CHANGE MASTER TO (see above)
  100. #
  101. # required unique id between 2 and 2^32 - 1
  102. # (and different from the master)
  103. # defaults to 2 if master-host is set
  104. # but will not function as a slave if omitted
  105. #server-id       = 2
  106. #
  107. # The replication master for this slave - required
  108. #master-host     =   <hostname>
  109. #
  110. # The username the slave will use for authentication when connecting
  111. # to the master - required
  112. #master-user     =   <username>
  113. #
  114. # The password the slave will authenticate with when connecting to
  115. # the master - required
  116. #master-password =   <password>
  117. #
  118. # The port the master is listening on.
  119. # optional - defaults to 3306
  120. #master-port     =  <port>
  121. #
  122. # binary logging - not required for slaves, but recommended
  123. #log-bin=mysql-bin

  124. # Uncomment the following if you are using InnoDB tables
  125. #innodb_data_home_dir = /usr/local/mysql/data
  126. #innodb_data_file_path = ibdata1:10M:autoextend
  127. #innodb_log_group_home_dir = /usr/local/mysql/data
  128. # You can set .._buffer_pool_size up to 50 - 80 %
  129. # of RAM but beware of setting memory usage too high
  130. #innodb_buffer_pool_size = 16M
  131. #innodb_additional_mem_pool_size = 2M
  132. # Set .._log_file_size to 25 % of buffer pool size
  133. #innodb_log_file_size = 5M
  134. #innodb_log_buffer_size = 8M
  135. #innodb_flush_log_at_trx_commit = 1
  136. #innodb_lock_wait_timeout = 50

  137. innodb_additional_mem_pool_size = 1G
  138. #innodb_buffer_pool_size         = 6G
  139. innodb_buffer_pool_size         = 1G


  140. [mysqldump]
  141. quick
  142. max_allowed_packet = 16M

  143. [mysql]
  144. no-auto-rehash
  145. # Remove the next comment character if you are not familiar with SQL
  146. #safe-updates

  147. [myisamchk]
  148. key_buffer_size = 20M
  149. sort_buffer_size = 20M
  150. read_buffer = 2M
  151. write_buffer = 2M

  152. [mysqlhotcopy]
  153. interactive-timeout
  154. [root@host011odb044 ~]#
复制代码
问题:
mysql -u xx -pxx  xx < xx.sql 在恢复数据,大约280G,此时查询information_schema.tables.data_length确定导入了多少数据,这时error日志报错如下:
  1. # tailf /var/lib/mysql/hostxxxx.err
  2. 140113 23:02:31 [ERROR] Invalid (old?) table or database name '.ssh'
  3. 140113 23:03:15 [ERROR] Invalid (old?) table or database name '.ssh'
  4. 140113 23:04:19 [ERROR] Invalid (old?) table or database name '.ssh'
  5. 140113 23:22:25 [ERROR] Invalid (old?) table or database name '.ssh'
  6. 140113 23:22:29 [ERROR] Invalid (old?) table or database name '.ssh'
  7. 140114  8:56:15 [ERROR] Invalid (old?) table or database name '.ssh'
  8. 140114  8:56:35 [ERROR] Invalid (old?) table or database name '.ssh'
  9. 140114  8:57:37 [ERROR] Invalid (old?) table or database name '.ssh'
  10. 140114  9:04:29 [ERROR] Invalid (old?) table or database name '.ssh'
  11. 140114  9:26:27 [ERROR] Invalid (old?) table or database name '.ssh'
复制代码
请问是什么原因,及如何处理,谢谢大家!

论坛徽章:
0
2 [报告]
发表于 2014-01-15 09:06 |只看该作者
既然提示说是无效的表名或者是数据库名,那么就到你备份文件查找“.ssh”,看看是否有这个,重命名一下试试!

论坛徽章:
0
3 [报告]
发表于 2014-01-15 09:12 |只看该作者
回复 2# xueleixu


问题中说了:
只有select * from  information_schema.tables where xxx;查询出才会有这错误,不查询就不报错,还有什么高见?谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP