zoukankan      html  css  js  c++  java
  • mysql

    sudo yum install mysql

    sudo yum install mysql-server

    sudo yum install mysql-devel

    sudo service mysql start

    sudo service mysql stop

    sudo service mysql start

    mysqladmin -u root password '123'

    mysql -u root -p

    1. SHOW database mysql> show databases

    2. create database mysql> create database abccs

    3. select database mysql> use abccs

    4. show what tables mysql> show tables

    5. create a tables mysql> create table mytable (name varchar(20), sex char(1), birth date, birthaddr varchar(20));

    6. show the created tables mysql> show tables

    7. show the table structure mysql> describe mytable

    8. using select command to check table content mysql> select * from mytable

    9. insert a record into table mysql> insert into mytable values (' abccs', ' f', '1974', 'china')

    10. load txt file into table

    set abccs f 1977-07-07 china 銆€ mary f 1978-12-12 usa tom m 1970-09-02 usa as  mysql.txt mysql> LOAD DATA LOCAL INFILE "mysql.txt" INTO TABLE mytable

    11. show table mysql> select * from mytable

    12. EXECUTE SCRIPT mysql> source *.sql

  • 相关阅读:
    输入框联想
    SyntaxError: missing ; before statement 错误的解决
    Oracle数据库DECODE函数的使用.
    MySQL ----命令总结!
    个介!
    递归函数
    闭包函数与装饰器
    函数对象
    力扣题
    函数基础
  • 原文地址:https://www.cnblogs.com/greencolor/p/2313817.html
Copyright © 2011-2022 走看看