解决方案 »
- MYSQL的疑惑
- mysql建立外键
- 源码下载包选择哪一个编译安装好
- 如何实现 侦测 客户端ip 实现控制单ip访问控制
- like '%abc' 可不可以优化
- 有没有可能查询mysql数据库一段时间内的读写次数
- postgresql数组!一直没有解决,请教.
- 一个关于sql server ce2.0的问题
- 为什么从一个数据库中读取图片然后再写到另一个数据库中老是不成功,但也不显示出错?(SQL server to MySQL))
- mysql多条数据查询出对应ID上下期余额不一致数据
- CentOs:ERROR 2002 (HY000): Can't connect to local MySQL server through socket
- 关于MYSQL的主主同步原理问题
如果没有%的host,是不能用-hip地址登录的。
ping 127.0.0.1 可以
ping localhost 可以
ping 192.168.1.101 (本机IP)也可以
+------+-----------+
| user | host |
+------+-----------+
| root | % |
| root | localhost |
+------+-----------+
2 rows in set (0.00 sec)
+------+-----------+
| user | host |
+------+-----------+
| root | % |
| root | localhost |
+------+-----------+
2 rows in set (0.00 sec)添加一个root@‘127.0.0.1’的用户试试。
show grants for root@'%';得到赋予权限的sql,然后将%换成127.0.0.1 重新执行下。
MySQL其实没有任何问题,我在data目录里面查看了一下mysql_error.log,信息如下:
2014-09-07T05:49:49.700894Z 0 [Note] Plugin 'FEDERATED' is disabled.
2014-09-07T05:49:49.702894Z 0 [Note] InnoDB: Using atomics to ref count buffer pool pages
2014-09-07T05:49:49.703894Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2014-09-07T05:49:49.703894Z 0 [Note] InnoDB: Uses system mutexes
2014-09-07T05:49:49.704894Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-09-07T05:49:49.706894Z 0 [Note] InnoDB: Number of pools: 1
2014-09-07T05:49:49.707895Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2014-09-07T05:49:49.709895Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128.0M, instances = 1
2014-09-07T05:49:49.717895Z 0 [Note] InnoDB: Completed initialization of buffer pool
2014-09-07T05:49:49.851903Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2014-09-07T05:49:49.871904Z 0 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1207097 in the ib_logfiles!
2014-09-07T05:49:49.872904Z 0 [Note] InnoDB: Database was not shutdown normally!
2014-09-07T05:49:49.873904Z 0 [Note] InnoDB: Starting crash recovery.
2014-09-07T05:49:49.874904Z 0 [Note] InnoDB: Reading tablespace information from the .ibd files...
2014-09-07T05:49:49.879904Z 0 [Note] InnoDB: Restoring possible half-written data pages
2014-09-07T05:49:49.880904Z 0 [Note] InnoDB: from the doublewrite buffer...
2014-09-07T05:49:50.093917Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2014-09-07T05:49:50.094917Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2014-09-07T05:49:50.095917Z 0 [Note] InnoDB: Setting file 'D:\mysql\mysql-5.7.4-m14-winx64\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2014-09-07T05:49:50.281927Z 0 [Note] InnoDB: File 'D:\mysql\mysql-5.7.4-m14-winx64\data\ibtmp1' size is now 12 MB.
2014-09-07T05:49:50.284928Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2014-09-07T05:49:50.285928Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2014-09-07T05:49:50.417935Z 0 [Note] InnoDB: Waiting for purge to start
2014-09-07T05:49:50.468938Z 0 [Note] InnoDB: 5.7.4 started; log sequence number 1207097
2014-09-07T05:49:50.470938Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2014-09-07T05:49:50.472938Z 0 [Note] IPv6 is available.
2014-09-07T05:49:50.473938Z 0 [Note] - '::' resolves to '::';
2014-09-07T05:49:50.474938Z 0 [Note] Server socket created on IP: '::'.
2014-09-07T05:49:50.498940Z 0 [Note] Event Scheduler: Loaded 0 events
2014-09-07T05:49:50.498940Z 0 [Note] MySQL: ready for connections.
Version: '5.7.4-m14' socket: '' port: 3306 MySQL Community Server (GPL)然后我在连接工具这边设置address为::1,然后就连进去了