![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
zn_hh
专注spring cloud开源开发
展开
-
忘记mysql密码
net stop mysql mysqld --skip-grant-tables 再打开一个cmd mysql use mysql update user set authentication_string=password("123456") where user="root"; flush privileges; quit原创 2020-06-11 09:59:29 · 120 阅读 · 0 评论 -
mysql分表
1.使用取余的方式 设计数据库表名为 tablename_0,tablename_1,tablename_2...的方式,然后根据id指定一个算法,得到表面后面的数字,数字id可以使用取余的方式,字符串可以使用hash算法。 2.使用merge引擎分表 #分表:注意分表的引擎为MyISAM CREATE TABLE IF NOT EXISTS `user1` ( `id` int(1...原创 2019-03-10 15:44:14 · 209 阅读 · 0 评论 -
mysql分区
方式一:Range分区 #注意:创建表和分区语句间不能有分号 CREATE TABLE USER ( id INT primary key, name VARCHAR(30) ) partition BY RANGE (id) ( partition p0 VALUES LESS THAN (5), partition p1 VALUES LESS THAN (...原创 2019-03-11 11:41:35 · 90 阅读 · 0 评论