OSX under the XAMPP integrated environment, how to implement the terminal operation of MySQL?

Source: Internet
Author: User
    • The direct input mysql -u root -p returns the following results:

-bash:mysql:command not found

    • Tried a method and seemingly successfully configured the environment variable, the code is as follows:

PATH="$PATH":/Applications/XAMPP/xamppfiles/bin

But to do so, exit the terminal and then go again and again. After looking for a variety of methods on the Internet, my brain is more humble, and finally did not succeed, and seemingly modified the root level of things, now open on the terminal there is an error. As follows:

Last login: Sun Sep 25 23:35:04 on ttys000-bash: PATH=${$PATH}:/Applications/XAMPP/xamppfiles/bin: bad substitution

To find a solution, tossing one night, really bad.

Reply content:

    • The direct input mysql -u root -p returns the following results:

-bash:mysql:command not found

    • Tried a method and seemingly successfully configured the environment variable, the code is as follows:

PATH="$PATH":/Applications/XAMPP/xamppfiles/bin

But to do so, exit the terminal and then go again and again. After looking for a variety of methods on the Internet, my brain is more humble, and finally did not succeed, and seemingly modified the root level of things, now open on the terminal there is an error. As follows:

Last login: Sun Sep 25 23:35:04 on ttys000-bash: PATH=${$PATH}:/Applications/XAMPP/xamppfiles/bin: bad substitution

To find a solution, tossing one night, really bad.

CentOS party, Mac OS should be about the same, no use.
Add MySQL environment variables to the test /etc/profile
And thensource/etc/profile

  • 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.