Home ›
Command line MySQL not working with XAMPPCommand line MySQL not working with XAMPP
Submitted by Benjamin Melançon on November 5, 2008 - 9:18am
Still have to try:
http://jwopitz.wordpress.com/2007/12/09/getting-mysql-mac-os-x-105-leopard-togetherfinally/
- Open a Terminal window.
- 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.
-
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"
-
type ctrl-x to initiate closing Pico.
- type y to save it.
- type enter to save to the prompted location
- You should now be back in Bash
- 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