Page 1 of 1

problem in GRANT command

PostPosted: Fri Sep 08, 2006 4:44 am
by sharad
HI
in subphse 6.1 /usr/local/mysql/bin/mysql
is a executable file so cd /usr/local/mysql/bin/mysql shows
-bash: cd: /usr/local/mysql/bin/mysql: Not a directory
so in it how can i runfollowing queries
GRANT SELECT,INSERT,UPDATE,DELETE on asterisk.* TO cron@'%' IDENTIFIED BY '1234';
GRANT SELECT,INSERT,UPDATE,DELETE on asterisk.* TO cron@localhost IDENTIFIED BY '1234';

and also if i try on /usr/local/mysql/include/mysql:
(RATHER THAN bin/mysql ) & try to GRANT queries then error shows
-bash: GRANT: command not found

my sql is running because
head /usr/lib/perl5/site_perl/5.8.7/Net/MySQL.pm
package Net::MySQL;

use 5.004;
use IO::Socket;
use Carp;
use vars qw($VERSION $DEBUG);
use strict;
$VERSION = '0.08';

use constant COMMAND_SLEEP => "\x00";
plz help me
thanks

PostPosted: Fri Sep 08, 2006 6:42 am
by mflorell
Where did you install the MySQL server binaries?

Net::MySQL is not the server application, just an interface to it.

PostPosted: Fri Sep 08, 2006 8:56 am
by sharad
sorry

problem on grant command & http://serverip.astguiclient/

PostPosted: Fri Sep 08, 2006 8:57 am
by sharad
hi sir
mysql executable file on usr/local/mysql/ibin
all .h files of mysql is on usr/local/mysql/include/mysql
Bassically i was failed in installation at first time of NET mysql .08. soin second time i was getting 3 paths in the command
locate mysql pm
the paths are
/usr/lib/perl5/site-perl/5.8.7/i486-linux/DBD/mysql.pm
&
/usr/lib/perl5/site-perl/5.8.7/i486-linux/Bundle/DBD/mysql.pm
& another
so i was replaced this path with next line commands
after it i was success in netsql installation.
Are it caused be a problem?
i find the output of http://my server ip/astguiclient/admin.php
following warnings
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /usr/local/apache2/htdocs/astguiclient/dbconnect.php on line 7

Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /usr/local/apache2/htdocs/astguiclient/dbconnect.php on line 8

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /usr/local/apache2/htdocs/astguiclient/dbconnect.php on line 8

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /usr/local/apache2/htdocs/astguiclient/admin.php on line 342

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /usr/local/apache2/htdocs/astguiclient/admin.php on line 343

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /usr/local/apache2/htdocs/astguiclient/admin.php on line 349

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /usr/local/apache2/htdocs/astguiclient/admin.php on line 350

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/astguiclient/dbconnect.php:7) in /usr/local/apache2/htdocs/astguiclient/admin.php on line 371

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/astguiclient/dbconnect.php:7) in /usr/local/apache2/htdocs/astguiclient/admin.php on line 372
Invalid Username/Password: ||| |SELECT count(*) from vicidial_users where user='' and pass='' and user_level > '6' and ast_admin_access='1';|
please help me for overall diagnosis of where is the actual problem.
Thanks in advance

PostPosted: Fri Sep 08, 2006 9:41 am
by SuPrSluG
What distro are you using? I use Debian therefore
webroot is /var/www Redhat is usually /var/www/html and slackware uses the uses the
/usr/local/apache2/htdocs
check your settings in all the dbconnect.php files and in /etc/astguiclient.conf to match those of your distro.

PostPosted: Sat Sep 09, 2006 4:26 am
by sharad
hi
thankyou for your response
i m using slackware 10.2
i have /usr/local/apache2/htdocs exists
I have not astguiclient.conf under /etc
but i download & placed under /etc
can it will work properly?
i give you following file which have errors:-
1--Error in /usr/local/apache2/htdocs/astguiclient/dbconnect.php in
following lines
$link=mysql_connect("localhost", "cron", "1234");
mysql_select_db("asterisk");
2-- Error in /usr/local/apache2/htdocs/astguiclient/admin.php
in
following lines
$rslt=mysql_query($stmt, $link);
3--Error in /usr/local/apache2/htdocs/astguiclient/admin.php
in
following lines
$row=mysql_fetch_row($rslt);
4--Error in/usr/local/apache2/htdocs/astguiclient/admin.php
in
following lines
$rslt=mysql_query($stmt, $link);
5-- Error in/usr/local/apache2/htdocs/astguiclient/admin.php
in
following lines
$row=mysql_fetch_row($rslt);
6--Error in /usr/local/apache2/htdocs/astguiclient/admin.php in
following lines
Header("WWW-Authenticate: Basic realm=\"VICI-ASTERISK\"");
7--Error in /usr/local/apache2/htdocs/astguiclient/admin.php
in
following lines
Header("HTTP/1.0 401 Unauthorized");
thankyou

PostPosted: Sat Sep 09, 2006 6:56 am
by mflorell
the /etc/astguiclient.conf file is only used in the 2.0 tree not in the 1.1 tree which is what he is using I believe.

PostPosted: Sat Sep 09, 2006 8:08 am
by D
We have had a similar issue. What would be a possible solution?

Thanks

PostPosted: Sat Sep 09, 2006 2:58 pm
by mflorell
Please try the 2.0.1b2 release. Net::MySQL is no longer used with it and astGUIclient is much easier to configure.