ERROR 1286 (42000): Unknown table engine 'InnoDB'
今天在操作数据的的时候,突然提示以下错误: ERROR 1286 (42000): Unknown table engine 'InnoDB'mysql> select version(); +-----------+ | version() | +-----------+ | 5.1.57 | +-----------+ 1 row in set (0.01 sec)mysql> show engines; +------------+---------+-----------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +------------+---------+-----------------------------------------------------------+--------------+------+------------+ | CSV | YES | CSV storage engine | NO | NO | NO | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO | +------------+---------+-----------------------------------------------------------+--------------+------+------------+4 rows in set (0.00 sec) mysql> show variables like 'have_innodb%'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | have_innodb | NO | +---------------+-------+ 1 row in set (0.00 sec) 至此发现数据库不支持INNOD引擎!!! mysql> show variables like '%dir%';
mysql 为用户添加资源限制
在使用MySQL中Grant新增用户的时候,为用户添加资源限制
在MySQL中,你可以为单独的用户设置MySQL的资源使用限制。可用的资源限制如下:
- MAX_QUERIES_PER_HOUR: 允许的每小时最大请求数量
- MAX_UPDATES_PER_HOUR: 允许的每小时最大更新数量
- MAX_CONNECTIONS_PER_HOUR: 允许的每小时最大连接(LCTT译注:其与 MySQL全局变量: max_user_connections 共同决定用户到数据库的同时连接数量)数量
- MAX_USER_CONNECTIONS: 对服务器的同时连接量
查看mysql表结构信息
一、简单描述表结构,字段类型
desc tabl_name; 或describe columns;
显示表结构,字段类型,主键,是否为空等属性,但不显示外键和字段的注释。
二,查看表生成的DDL
show create table 表名;
这个命令虽然显示起来不是太容易看, 这个不是问题可以用\G来结尾,使得结果容易阅读;该命令把创建表的DDL显示出来,于是表结构、类型,外键,备注全部显示出来了。我比较喜欢这个命令:输入简单,显示结果全面。
三,查询表中列的注释信息
use information_schema
select * from columns where table_name = '表名' ;
四、查看表的注释
select table_name,table_comment frominformation_schema.tables where table_schema = 'db' and table_name='表名'
五,只查询列名和注释
select column_name, column_comment from information_schema.columnswhere table_schema ='db' and table_name = '表名' ;
热门日志
分类
- Php(101)
- Java(8)
- Mysql(32)
- Ajax(2)
- Jsp(1)
- Struts(8)
- Linux(71)
- JavaScript(39)
- Staruml(0)
- Mouth(1)
- Html(6)
- Windows(8)
- Message(12)
- Lua(10)
- Compute(1)
- Redis(7)
- Nginx(11)
- Jquery(1)
- Apache(1)
- cocos2d-x(8)
- about(1)
- ssdb(1)
- Mac(7)
- C(1)
- memcache(1)
- Python(30)
- Vim(8)
- sed(2)
- ansible(3)
- awk(4)
- shell(3)
- Django(4)
- git(7)
- bat(4)
- svn(0)
- docker(1)
- Tornado(1)
- go(1)
- 架构(16)
- Vue(1)
最新日志
- Docker 那些事
- 欢迎您关注“刘善海价值分享”微信公众号!
- Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
- Linux vim/vi下backspace(退格键)出现^? 或^H
- python 如何通过subprocess.call调用自定义alias别名
- python2 python3中long类型的区别
- 10 个 Linux 中方便的 Bash 别名
- 'python' engine because the 'c' engine does not support regex separators
- importError c extension: No module named np_datetine not buit
- 四个提高工作效率的小技巧