in reply to MySQL CGI script not working in browser

i suspect you haven't added the user that the cgi connects as (in apache, by default, www-data) rights to the database.