The use of phpmyadmin tutorial

Operate the database in the visual interface of the phpMyAdmin graphical management tool

  1. Create a database
    Insert picture description here
  2. New data table:
    Insert picture description here
    After successfully creating a data table, define and edit its structure data, including: data name, data type, data length, attributes, data comments, etc., and finally "save". as follows:
    Insert picture description here
  3. Modify the data table:
    After the data table is created, its structure can be changed, such as modifying a single attribute, adding, deleting, etc.
    Insert picture description here
  4. Delete the data table, delete the database, all in "operation":
    Insert picture description here
    Insert picture description here

Use SQL statements to manipulate data tables

  1. Use SQL statements to insert data:
    Use insert statements in the SQL statement editing area to insert data into td_admin, click "Execute"
    For example: id = 1, name = www.php.cn, pwd = 12345
    Insert picture description here
    Insert picture description here
  2. Use SQL statement to modify data:
    Use update statement to modify data information in SQL editing area
    For example: id = 2, name = phpChinese, pwa = 54321
    Insert picture description here
    Insert picture description here
  3. Use SQL statements to query data
    Use select * to query data information at the SQL editing site:
    First, we need to compile a few more data so that the last query, and the same as the initial insert data, now there is a data, for example, add 4 more data , Id = 1, name = www.php.cn, pwd = 12345;
    id = 3, name = www.baidu.com, pwd = 111;
    id = 4, name = google.com, pwd = 222;
    Insert picture description here
    then use select * Statement for query:
    for example: find the one with id <2
    Insert picture description here
    Insert picture description here
  4. Use SQL statement to delete data:
    Use delete to delete data information in the SQL editor:
    for example: delete the data of name = google.com
    Insert picture description here
    Insert picture description here
    Tips: If there is no where conditional statement after the delete statement, then all data in the specified data table will be deleted.

Management data records

  1. Insert data:
    for example: insert www.firefox
    select data table- > insert- > add data-> execute
    Insert picture description here
    Insert picture description here
    Insert picture description here
  2. Search data:
    Insert picture description here

Import and export data tables

Import and everywhere are two opposite operations. Import is to import the file with the extension name .sql on the computer into the phpmyadmin database, and export is to save the data table structure and data records in the database as .sql. Save the file with the suffix on the computer. By importing and exporting, we can backup and restore the database.

  1. Export data:
    select the data table to be exported, and then export
    Insert picture description here
    Insert picture description here
  2. Import data:
    select the database, and then import
    Insert picture description here
    Tips:
    before importing the data, make sure that there is a database with the same name as the original database of the imported data in phpmyadmin, for example, if there is a database of php.cn, if not, create a new one; If there is a data table with the same name as the data to be imported in the database, the import will fail.
Published 19 original articles · Like1 · Visits 378

Guess you like

Origin blog.csdn.net/weixin_45798017/article/details/105071853