Home>Article>Operation and Maintenance> How to use MySQL in phpstudy

How to use MySQL in phpstudy

(*-*)浩
(*-*)浩 Original
2019-07-13 10:00:49 22925browse

Summary:In phpstudy, you can use the integrated graphical data management tool phpadmin to operate MySQL. Step 1: Click to open the "MySQL Manager"; Step 2: Click to open the "phpMyAdmin" tool; Step 3: Enter the default account and password root, and you can operate MySQL.

How to use MySQL in phpstudy

Next is some use of mysql in phpstudy. First of all, I discovered the front-end visual interface that comes with it.

How to use MySQL in phpstudy

You can also use the MySQL tool and click the MySQL command line to write Mysql statements.

Method 1: Use MySQL for phpadmin operations

In phpstudy, you can use the integrated graphical data management tool phpadmin to operate using MySQL. As shown above: Click to open "MySQL Manager", find the "phpMyAdmin" tool, enter the default account and password root, and you can operate MySQL.

Note: The default account password for mysql in phpstudy is root, and it is useless to just change the password in that file.

How to use MySQL in phpstudy

Method 2: Operate through the command line using mysql

If you want to view all databases in your own database on the command line interface:

show databases; (Note that in the mysql statement, if you finish a sentence, you must add a semicolon; if you press Enter without adding a semicolon, it will be considered that you have not finished the sentence.) (Also There is no case sensitivity in mysql statements)

I want to get a database to use

use the database name;

I want to To query all the contents of a table in the database

(Check) select .(It can be the specified column name/*).from table_name;(You can query multiple in the middle such as User comma Password)

Delete, add, modify

Delete delete from table name where condition

Add insert into table name values (correspond to the order when added)

Change update table name set column name=value;

For more technical articles related to phpstudy, please visit thephpstudy usage tutorialcolumn to learn!

The above is the detailed content of How to use MySQL in phpstudy. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn