A little experience using mysql on Ubuntu

Install mysql

Create a database: create database test

show databases; view which databases are there

Create a table: create table test (

View table: use describe table; view (Note: you must use the use table to enter the database before you can use this command)

Delete table:

drop table;truncate (table);
truncate is to delete all data in the table
Drop is to delete the table directly, it cannot be retrieved.

delete also deletes data in the table, but can be used in conjunction with where to delete specific rows;

- - Delete all data in the table
deletefrom user;--Delete specified line
deletefrom user where username ='Tom';

View the data of the table:

Use select*from table;View data

Use show tables to view the table name under test

Reset the mysql password to root

method 1:

Recommended Posts

A little experience using mysql on Ubuntu
Install mysql on Ubuntu 14.04
Install Mysql offline on Ubuntu
How to install MySQL on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
Install and configure MySQL on Ubuntu
Build a file server on ubuntu
How to install MySQL on Ubuntu 14.04
Learn a little linux every day-install ubuntu system on real machine
Build a LAMP development environment on Ubuntu 16.04
WordPress-Build a personal blog based on Ubuntu 16.04
How to install MySQL on Ubuntu 18.04 (linux)
How to install Java on Ubuntu 16.04 using Apt-Get
Talking about the first experience of using Ubuntu
lamp on ubuntu
Ubuntu14 upgrade MySQL
How to send mail using sendemail on ubuntu
How to install the latest MySQL on Ubuntu 18.04
How to set up a DNS server on Ubuntu 18.04
How to start a blog with Hexo on Ubuntu 14.04
How to install and use MySQL Workbench on Ubuntu 18.04
A simple tutorial to install Sogou Pinyin on ubuntu18.04
How to configure a fixed IP based on Ubuntu 18.04
Install Ubuntu on VMware virtual machine and install using UltraISO
How to set a fixed IP based on Ubuntu 16.04
install vscode on ubuntu18
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install docker on Ubuntu
Install mysql under Ubuntu 16.04
Ubuntu20.04 experience and beautification
Install nodejs10 on Ubuntu16
Ubuntu18.04.3 LTS first experience
Install Pytorch+CUDA on Ubuntu 16.04
Install Python3 on Ubuntu 14.04
Ubuntu19 install MySQL pit
Install rJava on Ubuntu18
Ubuntu completely remove MySQL
Install JDK10+ on Ubuntu
Install Python3 on Ubuntu 16.04
ROS learning---Install ROS on Ubuntu
Install MySQL under Ubuntu
Install KDE on Ubuntu16.04.2
Install Docker on Ubuntu18
Install Python3.7 on Ubuntu
Install flashplayer on Ubuntu
How to set up a Masterless Puppet environment on Ubuntu 14.04
Teach you how to build a Git server on Ubuntu
How to set up a firewall with UFW on Ubuntu 14.04
How to set up a production Elasticsearch cluster on Ubuntu 14.04
How to install JDK and Mysql on Ubuntu 18.04 linux system
How to install Dropbox Client as a service on Ubuntu 14.04
How to create a Sudo user on Ubuntu [Quick Start]