Linux finds keywords in files
                            

grep MySQL ./my.cnf

class:Linux views:84

Mysql displays the data table in the library
                            

use mysql; show tables;

class:Mysql views:58

Mysql create table
                            

use db_name; CREATE TABLE `tb`( `id` INT UNSIGNED AUTO_INCREMENT, `title` VARCHAR(100) NOT NULL, `author` VARCHAR(40) NOT NULL, `date` DATE, PRIMARY KEY ( `id` ) )ENGINE=InnoDB DEFAULT CHARSET=utf8;

class:Mysql views:109

Mysql add index
                            

ALTER TABLE table_name ADD INDEX (title)

class:Mysql views:68

Mysql create database
                            

create database db_name;

class:Mysql views:76

Mysql create user
                            

create user 'alex'@'192.118.1.1' identified by '123'; create user 'alex'@'192.118.1.%' identified by '123'; create user 'alex'@'%' identified by '123';

class:Mysql views:52

Mysql data table rename
                            

alter table tb rename tb1;

class:Mysql views:111

Mysql export a table
                            

mysqldump -h localhost -u root -p mydb mytable>e:\MySQL\mytable.sql

class:Mysql views:86

Mysql delete a column
                            

ALTER TABLE tb1 DROP COLUMN title;

class:Mysql views:96

Mysql exports all databases
                            

mysqldump -h localhost -u root -p mydb >e:\MySQL\mydb.sql

class:Mysql views:76

Mysql displays the database list
                            

show databases;

class:Mysql views:75

Mysql delete database and delete table
                            

drop database db_name; drop table table_name;

class:Mysql views:101

Mysql clears the records in the table
                            

delete from table_name1; truncate table table_name2;

class:Mysql views:69

Mysql displays the structure of the data table
                            

describe table_name;

class:Mysql views:78

MongoDB queries data for a field that is not empty
                            

db.neeq2008.find({"name":{"$ne":null}})

class:MongoDB views:104

Linux move files or folders
                            

mv -f -v test.zip test

class:Linux views:115

Linux delete empty directories
                            

rmdir -pv /root/newdir2/newdir3

class:Linux views:109

Linux searches for files ending in'.d'
                            

find /lib/dracut/ -name \*.d

class:Linux views:114

MongoDB batch modify values
                            

db.getCollection('rule').update({"key":".$"},{$set:{"key":"\\\\.$"}},false, true)

class:MongoDB views:135

Linux switch directory
                            

cd /home

class:Linux views:110

MongoDB deletes a field in the table
                            

db.cninfo2006.update({"fieldname":{$exists: true} },{$unset:{"fieldname":1}},false,true);

class:MongoDB views:110

This platform is gradually under construction, more development orders are gradually included, any questions or Suggestions can be Contact Us