In the xampp integrated environment of osx, how does one operate mysql on a terminal?

Source: Internet
Author: User
Directly input mysql-uroot-p and return the following result:-bash: mysql: commandnotfound tried a method and it seems that the environment variable has been successfully configured. the code is as follows: {code ...} but in this case, you have to repeat it again after exiting the terminal. After that, I found various types on the internet...
  • Enter directlymysql -u root -pThe following results are returned:

-Bash: mysql: command not found

  • I tried a method and it seems that the environment variable has been successfully configured. the code is as follows:

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

But in this case, you have to repeat it again after exiting the terminal. After finding various methods on the Internet, I had a poor mind and finally failed. it seems that I have modified the root-level stuff. now there is an error when I open it on terminal. As follows:

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

It's hard to find a solution.

Reply content:
  • Enter directlymysql -u root -pThe following results are returned:

-Bash: mysql: command not found

  • I tried a method and it seems that the environment variable has been successfully configured. the code is as follows:

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

But in this case, you have to repeat it again after exiting the terminal. After finding various methods on the Internet, I had a poor mind and finally failed. it seems that I have modified the root-level stuff. now there is an error when I open it on terminal. As follows:

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

It's hard to find a solution.

Centos party, mac OS should be similar, never used.
Add mysql environment variables/etc/profileTry
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.