Common mysql commands and basic mysql commands
Mysql database usage Summary
This article mainly records some mysql commands for future query.
1. Change the root password
Mysqladmin-uroot password 'yourpassword'
2. remotely log on to the mysql server
Mysql-uroot-p-hip-P3306
3. query the database
Show databases;
4. Enter
Common mysql commands and basic mysql commands
I installed MySQL5.5.27 today to view some common commands.
1. log on to MySqlIn the cmd window, enter the bin directory installed by MySql,Command:Bin> mysql-u root-p[Database name] Press enter and enter the password
2. view the version number:Mysql> select version ();
(mm/dd/yy format)
%T
Display time format, 24-hour (HH:MM:SS)
%x
Format of the display date (MM/DD/YY)
%y
The last two digits of the year
%Y
Years (e.g. 2007, 2008)
%r
Time (Hh:mm:ss morning or afternoon)
%p
Show morning or afternoon
If you enter a command:Date "+%x,%r"The system returns the following information:March 26, 2010, 18:06 P.M. 49 seconds4.7 cal CommandThe CAL co
file after a few lines-N: Specify the number of rows-F: Dynamically displays the end-of-file class capacityLN: Generating a linked file-S Create soft connectionExample: Ln-s source file Destination file generation soft connection (shortcut)ln source file destination file generated hard link (source file destination file sync update, copy, source file missing hard link still in, cannot cross partition)by Ls-i to see if it is a hard link, I-node numbers are the sameThis article is from the "Tommy
Linux basic commands (2) commands on disk space, linux disk spaceDisk Space commands
Command
Function
Mount
Mount a File System
Umount
Detach a mounted file system
Df
Check the disk space of each hard disk partition and mounted file system
Du
Show file directo
Improve readability of information in kilobytes, MB, GB
-S
Only the sum of each file size is listed
-X
Only compute files that belong to the same file system
2.5 fsck CommandThe function of the fsck command is to check and repair the Linux file system, which is best used when no one or no partition hangs up, in fact, each boot system will do a check to see if there is a bad track or data loss phenomenon. Usage:fsck (-option) partition name
, which is a very dangerous option
-V
Verbose: Show the progress of a file's movement
MV T.txt document moves the file T.txt to the directory document.1.9 RM CommandThe RM command is used to delete files.
Options
Description
-I.
Interactive: Prompt to confirm deletion
-F
Force: Replace interactive mode without prompting to confirm deletion
-V
Verbose: Show file deletion progress
Summary of basic linux vi commands and summary of linuxvi commands
This is to prevent you from forgetting and writing it, so it is not detailed.
Yum install (command) Installation command
Nano file editing
Vi
Delete file: rm
-I confirm before deletion
-F not confirmed before deletion
-R recursive Deletion
Rm-rf/file name
Cp: copy
Cp src dest
-R
-Confirm before I
Basic Linux commands and Linux commands
[Epeter @ localhost ~] $
Where: epeter is the user name; localhost is the current host name ;~ The broken wave number indicates that the current user directory is used (If yes, the slash indicates that the current root directory is used ); $ indicates that you are currently logged on as a normal user (If yes, # indicates th
Linux Security Basics: network configuration commands and linux basic configuration commands
1. ifconfig view and configure network interface information(1) set an IP addressIfconfig eth0 192.168.0.1(2) temporarily disable or enable the NICIfconfig eth0 downIfconfig eth0 up(3) set the subnet maskIfconfig eth0 netmask 255.255.255.0(4) view the status of the first
Django basic commands, Django commands
1. Create a project
Django-admin.py startproject myblog
2. Create an app
Python manage. py startapp blog
3. Create a database table or change a database table or field
Python manage. py makemigrations blog
Python manage. py migrate
4. Run the Development Server
Python manage. py runserver
5. Clear the database
Pyt
Summary of basic MySQL commands and common commands bitsCN.com
Start: net start mysql;Enter: mysql-u root-p/mysql-h localhost-u root-p databaseName;List databases: show databases;Select database: use databaseName;List tables: show tables;Show columns from tableName;Create a database: source fileName.txt;Matching character: Wildcard _ can be used to represent any
Five steps to master the basic development and usage commands of Git, and five steps to master git commandsStep 1: set global variables:
git config --global user.name "gang.li"git config --global user.email "ligang@ptthink.com"Step 2: Initialize the repository and push it to the remote repository (if this step is performed for the first push, otherwise skip this step ):
/* Create a project folder and initia
Summary of common linux commands and parameters (basic) and common linux commands
1. user's home directory (~) In linux, users all have their own home directories. you can place your own configuration files and other things. pwd: list the current directory. optional parameter-P: when the current directory is a link directory, the real path is displayed. ls: List
Linux basic commands and linux commandsLs command
Pwd: display the current directory touch 11.txt: Create a txt file named 11 mkdir laowang under the current directory: Create a folder named laowang ls-a-l-h in the current directory: it is equivalent to ls-alh.-a is used to display all files in the current directory, including hidden files.-l is displayed as a list, -h is the size of the displayed file auto
(source) target (destination)[email protected] ~]# CP [options] Source1 source2 source3 .... directory
Parameters used with the CP:
-A: As-pdr means, please refer to the following instructions for PDR. (common)-D: If the source file is the attribute of the link file, the link file property is copied instead of the file itself;-I: If the target file (destination) already exists, the action will be asked (commonly used) when overwriting-P: Copy the past along with the properties of
Ipcclean removes internal and isolated signal sharing signs from the stopped PostgreSQL Server
Pg_ctl start, stop, and restart the postgresql service (for example, pg_ctl start starts the postgresql service, which is the same as service PostgreSQL start)
Pg_controldata displays the internal control information of the postgresql service
Postgres PostgreSQL single-user database service
Postmaster PostgreSQL multi-user database service
4. Psql is the most important client program. To e
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.