User login

Command line MySQL not working with XAMPP

Still have to try:

http://jwopitz.wordpress.com/2007/12/09/getting-mysql-mac-os-x-105-leopard-togetherfinally/

  1. Open a Terminal window.
  2. Use a command-line text editor to create the enviro-vars and aliases by typing pico ~/.bash_login (that is a tilde not a dash btw). This opens the pico text editor and either opens or creates the .bash_login hidden file at your user’s folder.
  3. Add the following text:

    export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
    alias mysql-start="sudo /usr/local/mysql/support-files/mysql.server start"
    alias mysql-stop="sudo /usr/local/mysql/support-files/mysql.server stop"

  4. type ctrl-x to initiate closing Pico.

  5. type y to save it.
  6. type enter to save to the prompted location
  7. You should now be back in Bash
  8. Now get Teminal to load those new aliases and path type: . ~/.bash_login

Not working yet. Maybe after restarting the computer. (or maybe this is what's breaking MySQL altogether after restarting xampp, hmm....)

Resolution

Searched words: 
add mysqli to path mac os x xampp mysqli command line xampp mysqli command line mac os x mac os x command line mysql xampp mysql paths mac os x

Comments

mysql (xampp) not working in command line

I tried the above export instructions. still won't work. won't allow me to create database in the command line.

Thanks

You need to find where XAMPP

You need to find where XAMPP installed the mysql binary. For my install it was in /Applications/xampp/xamppfiles/bin so find where you installed XAMPP and then go digging from there.

This is my export path in my ~/.profile file. (not ~/.bash_login)

export PATH=/opt/local/bin:/opt/local/sbin:/Applications/xampp/xamppfiles/bin:$PATH

I hope that helps someone...

(ps. a CAPTCHA? really?)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.