Mysql environment variable settings when switching from DOS to mysql

Source: Internet
Author: User

I often use mysql environment variables. Open DOS in Windows XP and run the "mysql-u root-p" command to switch to mysql. The switchover fails, as shown below:

Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C: \> mysql-u root-p
'Mysql' is neither an internal or external command nor a running program
Or batch files.

This error occurs because the mysql PATH is not added to the mysql environment variable PATH. If you are on a unix platform, you can add a PATH through PATH = XXX; export PATH. on Windows XP, follow these steps to add the mysql path to the mysql environment variable:

Right-click "my computer"-"properties"-"advanced"-"environment variable"-"system variable"-double-click "Path"-change the mysql Path to "C: \ Program Files \ MySQL Server 5.0 \ bin add-"OK"

After adding the package, go to DOS for a test:

C: \> mysql-u root-p
Enter password :**********
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 21
Server version: 5.0.45-community-nt MySQL Community Edition (GPL)
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Mysql>

Successful!

Top 10 most noteworthy MySQL Variables

Application of MySQL System Variables

Difference between NULL and MySQL NULL strings

In-depth study of MySQL result strings

MySQL string truncation Function Method

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.