Mysql数据库相关基础知识

参考博客:
--MySQL 版本
[url]https://blog.csdn.net/nh5431313/article/details/62036374[/url]
-- MySQL 表引擎 InnoDB、MyISAM、CSV、MEMORY、BLACKHOLE、ARCHIVE、MRG_MYISAM、PERFORMACE_SCHEMA等
[url]https://www.cnblogs.com/xwgcxk/p/8855644.html[/url]
[url]https://www.cnblogs.com/xfvipp/p/5474606.html[/url]
[url]https://blog.csdn.net/renwudao24/article/details/52136955[/url]

--mysql数据库允许远程连接
[url]http://jingyan.baidu.com/article/64d05a0258526dde54f73b6a.html[/url]
[url]http://jingyan.baidu.com/article/6dad5075198f18a122e36e72.html[/url]
[url]https://zhidao.baidu.com/question/618660372686365012.html[/url]

--mysql安装后的几个默认数据库:information_schema; performance_schema;mysql;test;
[url]http://blog.csdn.net/zhang123456456/article/details/53771076[/url]

【数据库表结构设计】
--MySQL性能优化之char、varchar、text的区别
[url]https://blog.csdn.net/brycegao321/article/details/78038272[/url]
--mysql datetime、date、time、timestamp区别
[url]https://www.cnblogs.com/andydao/p/3182146.html[/url]
--无符号 有符号 int bigint
[url]https://blog.csdn.net/qq_34627002/article/details/80158056[/url]
[url]https://blog.csdn.net/atlandis_jl/article/details/45536387[/url]

-- Linux下修改MySQL用户(root)密码
[url]http://blog.csdn.net/inslow/article/details/54291182[/url]

1、数据库连接时:jdbc:mysql://localhost:3306/......,输入IP地址、localhost、127.0.0.1任何一种主机名称都能访问mysql数据库时,应往建立连接以后的默认mysql数据库的user表中插入3者中的剩下2条记录。形如:

[img]http://dl2.iteye.com/upload/attachment/0113/4607/9f07359a-3543-3d45-8b83-a3b1ac56e6bb.png[/img]

[b]2、linux命令登录mysql数据库[/b]
mysql -h localhost -uJava -pJava studentDB;


[b]3、解锁[/b]
show processlist;
kill 8888;


[b]4、基本[/b]
desc t_bbs_user;
describe t_bbs_user;
show create table t_bbs_user;
show fields from t_bbs_user;
show full fields from t_bbs_user; --包含comment
show full columns from t_bbs_user; --包含comment
show columns from t_bbs_user; --包含comment
show index from t_bbs_user;
show engines;
show procedure status;


[b]5、唯一索引[/b]
//唯一约束
ALTER TABLE t_bbs_a ADD UNIQUE(keyId);
alter table t_bbs_b add unique index unique_custId_tickId(CUSTOMER_ID,TICKET_ID,STATUS);


[b]6、建表时注意[/b]
mysql
索引类型:Normal, Unique, Full Text;
索引方法:Btree, Hash;


[b]7、重启[/b]
mysql相关:
1、/etc/rc.d/init.d/mysqld status 看看mysql是否已经启动
2、在 /usr/local/mysql/bin 下,运行 service mysqld start
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值