/    Sign up×
Community /Pin to ProfileBookmark

issue logging into myphp client with Leopard osx

Hi all Developers, i have an issue with logging in into the mysql client.
I use a mac Leopard osx so i “try” to access via the Terminal application, my MySql isn’t the one downloaded from the mysql website but its the Xamp package.
so ok, when i type /usr/local/mysql/bin/mysql
i get this error message:
“ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)”:

if i just type….mysql -u root -p: i get: command not found.

the thing is that if i try to log in through php script using the: mysql_connect() function, everithing works fine and i can access mysql successfully, but i need the client interface ?
there should not be any problem as mysql is running,

any help?
thank you

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@tivrfoaFeb 01.2009 — I don't use Mac ?

install phpMyAdmin. It's an excellent program to work with mysql.

http://www.servercodex.com/archives/2003/07/02/phpmyadmin-on-mac-os-x/
Copy linkTweet thisAlerts:
@MindzaiFeb 01.2009 — try connecting via 127.0.0.1 instead of localhost.
Copy linkTweet thisAlerts:
@jsfreakauthorFeb 01.2009 — >mysql -h 127.0.0.1 -u root -p

still no results, though should not be a problem as i've red that that host could also be set to off if not wrking on a remote server but in the own machine.

thx for advising the phpmyadmin but i woud like to first learn the sql sintax and create databases-tables manually.
Copy linkTweet thisAlerts:
@jsfreakauthorFeb 01.2009 — hey guys, thank you! i've found the solution, the issue was simply the path/to/mysql

which was

/Applications/xampp/xamppfiles/bin/mysql
×

Success!

Help @jsfreak spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...