Hi!
I just installed everything according to the 1.st post.
I got 3 problems, 2 of them are solved in this forum, they were:
1.) When using the ipkg eaccelerator, server gives internal error 500 when the extension of a file is *.php, but it works well with *.html.
solution: do the manual install.
2.) couldn't connect to the mysql, something about authorization error
solution: delete or comment the 20.th line of my.cnf that says password
And finaly the one i cannot find anywhere.
3.) I dumped a database from my wamp installation.
mysqldump kruh > kruh.sql;
i moved this file to my router, executed it with
source kruh.sql;
everything works fine, i am able to run selects, for instance select(*) from users; gives me 4.
But i cannot get this to work in php.
My code:
Code:
$db_host = 'localhost';
$db_user = 'bady';
$db_pass = '';
$db_data = 'kruh';
// ---------------------------------------------------
$link=mysql_connect($db_host,$db_user,$db_pass);
if(!$link) die("unable to connect: ".mysql_error());
mysql_select_db($db_data,$link);
$x=mysql_result(mysql_query("select count(*) from users",$link),0);
echo $x;
This returns nothing
If i change the select to "select NOW() from dual" it works fine, so im connected to DB. What am i doing wrong?
EDIT: this solved the problem:
typed this in mysql console: grant all privileges on *.* to ''@'localhost';