problem in GRANT command

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

problem in GRANT command

Postby sharad » Fri Sep 08, 2006 4:44 am

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
sharad
 
Posts: 36
Joined: Fri Jul 21, 2006 7:47 am

Postby mflorell » Fri Sep 08, 2006 6:42 am

Where did you install the MySQL server binaries?

Net::MySQL is not the server application, just an interface to it.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby sharad » Fri Sep 08, 2006 8:56 am

sorry
Last edited by sharad on Fri Sep 08, 2006 9:05 am, edited 1 time in total.
sharad
 
Posts: 36
Joined: Fri Jul 21, 2006 7:47 am

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

Postby sharad » Fri Sep 08, 2006 8:57 am

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
sharad
 
Posts: 36
Joined: Fri Jul 21, 2006 7:47 am

Postby SuPrSluG » Fri Sep 08, 2006 9:41 am

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.
SuPrSluG
 
Posts: 71
Joined: Thu Aug 24, 2006 8:01 pm

Postby sharad » Sat Sep 09, 2006 4:26 am

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
sharad
 
Posts: 36
Joined: Fri Jul 21, 2006 7:47 am

Postby mflorell » Sat Sep 09, 2006 6:56 am

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.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby D » Sat Sep 09, 2006 8:08 am

We have had a similar issue. What would be a possible solution?

Thanks
D
 
Posts: 87
Joined: Mon Jun 19, 2006 11:36 pm

Postby mflorell » Sat Sep 09, 2006 2:58 pm

Please try the 2.0.1b2 release. Net::MySQL is no longer used with it and astGUIclient is much easier to configure.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 114 guests