mysql -h localhost -uroot -p123456 //连接数据库 show databases; //查看数据库 create database if not exists db_goods; //创建数据库 use db_goods; //使用数据库 show tables; //查看数据库里表 create table goods(id int, name varchar(10)); //创建表 desc goods; //查看标结构 insert into goods(…
SELECT * FROM information_schema.`TABLES` where TABLE_SCHEMA = '数据库名';SELECT * FROM information_schema.`COLUMNS` where TABLE_SCHEMA = '数据库名' and TABLE_NAME = '数据表名';…
SELECT TOP 100 PERCENT --a.id, CASE WHEN a.colorder = 1 THEN d.name ELSE '' END AS 表名, CASE WHEN a.colorder = 1 THEN isnull(f.value, '') ELSE '' END AS 表说明, a.colorder AS 字段序号, a.name AS 字段名, CASE WHEN COLUMNPROPERTY(a.id, a.n…
SELECT TOP 100 PERCENT --a.id, CASE WHEN a.colorder = 1 THEN d.name ELSE '' END AS 表名, CASE WHEN a.colorder = 1 THEN isnull(f.value, '') ELSE '' END AS 表说明, a.colorder AS 字段序号, a.name AS 字段名, CASE WHEN COLUMNPROPERTY(a.id, a.n…
确保线上的运行数据库是不可避免的本人小白,因公司上线没有办法自己去整服务器,深刻体会到服务器大神的霸气,所以为了增加记忆,服务广大员友记录一下 linux mysql 忘记root的密码无法登陆进mysql 1.修改MySQL的配置文件/etc/my.conf在[mysqld]下面增加一行skip-grant-table; 2.修改配置文件后重启MySQL service mysqld restart 3.然后使用常规的命令进行登陆mysql mysql -u root -p 在提示输入密码的时…