Wednesday, 18 September 2013

how to configure mysql to accept local queries

how to configure mysql to accept local queries

Hi have a c++ application that makes queries to mysql database, I need to
run LOAD DATA LOCAL INFILE but if I do this from c++ it does not work...
right now I have it set using the username in my.cnf which is on default
(mysql)
#define USER "mysql"
#define PASSWD "jdhfa"
#define URL "tcp://10.3.21.49:3306"
if I use 127.0.0.1 in the url it will throw an error
Can't connect to MySQL server on '127.0.0.1' (111) (MySQL error code:
2003, SQLState: HY000 )
Server waiting for connections
In my.cnf I changed bind address to my IP becasue I need to access the
database from other places, but I still need to use it from my c++
program, I tried to add two bind-address statement
bind-address 10.3.21.49
bind-address 127.0.0.1
and this did not work.
I am not sure what else to do here??

No comments:

Post a Comment