Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql

 
Friend
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I installed mysql when Linux operating system is installed.
And i write a c++ database connectivity program.
When I give mysqladmin status in the command prompt
I got an error: Cann't connect to local MySQL server through socket /var/lib/mysql.sock(111).
Pls give me a solution for this...
Thanks.
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you set up the mySQL userid(s) and Passwords? That is a usual problem.
See: http://www.mysql.com/doc/A/c/Access_denied.html
This is totally different that 'normal Unix' login ID's/PW's. MySql ID's can (but do not have to) be the same as the Unix userid. Passwords can also be different.
Additionally, GRANT's probably need to be issued via mySQL root to allow particular mySQL users to access particular DB resources without interactively specifying a password.
Make sure you can access the DB/tables from the command line before you try C++ access.
RTFM at www.mysql.com.
Regards, Guy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic