C API problem in version 4.1.13
Hello!
I had a working CGI program written in C using mysql based on Apache & mysql4.0.2 & RedHat9.
Now I installed FC3 (Fedora Core 3) and MySQL4.1.13 (-client -shared -devel -server) from scratch, created the users and databases in MySQL.
I'm able to log in using mysql, mysqladmin, even mysql-administrator. But I'm unable to set up the C API connection (mysql_real_connect) with the same C program that worked earlier. I run the CGI script at home with the above new configuration, and at a production site, where nothing has been changed since the last working version (that is Debian10, MySQL4.0.24). At the production site the CGI script and the MySQL server is on the same computer, too. So host 'localhost' works fine on both sites.
At home I got the error message: I couldn't connect to the local mysql server through socket /var/lib/mysql/mysql.sock (13). I configured the socket to be /tmp/mysql.sock in order to be sure that no problems occur with the filesystem access rights, but that didn't help (same result).
At production site I got the error message: Access denied for user 'nn@localhost' for database 'xy'. At the same time the same username-password is eligible to access the database through phpMyAdmin2.6.2 in a browser.
So, after all, I can imagine only that the C API has some changes but I couldn't see any change in the documentation. My code is still:
MYSQL mydb;
mysql_init(&mydb);
mysql_real_connect(&mydb,"localhost","user","password","database",0,NULL,0);
and it gives the error 2002.
any idea what is wrong?
thanks in advance:
Peter