本节内容:
mysql索引重建方法
操作方法:
./myisamchk -r -q 路径/数据库/表名
例如:
复制代码 代码示例:
./myisamchk -r -q ./../crawler/feed
alter table feed Auto_increment=34909090
alter table feed modify raw_url varchar(255) BINARY NOT NULL;
首先,登陆
复制代码 代码示例:
grant all on crawler.* to tt@192.168.40.13 identified by '密码'
chmod -R 775 目录(.当前目录)
mysql -u root -p crawler < /home/liyi/db.sql
添加用户并赋值所有权限包括远程连接
复制代码 代码示例:
grant all privileges on *.* to "spider"@"192.168.40.%" identified by 'crawler' with grant option;
grant all privileges on *.* to "spider"@"%" identified by 'crawler' with grant option; 远程权限
grant all privileges on *.* to "spider"@"localhost" identified by 'crawler' with grant option; 本机权限
flush privileges;
Error Code : 1406
Data too long for column 'title' at row 1
修改my.ini文件,将
复制代码 代码示例:
sql-mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
注释掉,ok!
或者
解决办法:
在my.ini里找到
复制代码 代码示