How to run PHP and MySQL commands under Dos

Source: Internet
Author: User
Tags mysql commands php and mysql

1. Configure PHP

If you want to run PHP files under Dos, you must add the PHP installation directory to the environment variables. The steps are as follows:

My Computer-Properties-advanced-environment variables-system variables,

First, see if the variable path exists, if it does not exist, you can click on the "new" one; if it exists and already has the value, select Path, click "Edit", the PHP installation path inside your computer appended to the existing path value, note: use English (semicolon) ";" Apart

Complete the above operation, you can run PHP files in DOS, directly in the DOS type: PHP xx.php can!

2. Configure MySQL

Add the MySQL Bin directory to the environment variable Path.

For example: MySQL installation path is: E:\MySQL, then in path should be added:; E:\MySQL\bin

Restart DOS after completion, type the command: "mysql-u user name-p password Database" to enter the MySQL management interface

For example: Mysql-uroot-proot (user name after-U does not have a space)

How to run PHP and MySQL commands under Dos

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.