on scratch install with MYSQL

All installation and configuration problems and questions

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

on scratch install with MYSQL

Postby ruben23 » Thu Jan 15, 2009 2:59 pm

hi im creating data for my asterisk database

GRANT SELECT,INSERT,UPDATE,DELETE on asterisk.* TO cron@'%' ==>OK
IDENTIFIED BY '1234'; ==>OK
GRANT SELECT,INSERT,UPDATE,DELETE on asterisk.* TO cron@localhost
IDENTIFIED BY '1234';
create database asterisk;
use asterisk; ALL ARE WORKING GOOD..

then when i got to input

\. /usr/share/astguiclient/MySQL_AST_CREATE_tables.sql

got this error:

mysql> \. /usr/share/astguiclient/MySQL_AST_CREATE_tables.sql
ERROR:
Failed to open file '/usr/share/astguiclient/MySQL_AST_CREATE_tables.sql', error: 2
mysql> \. /usr/share/astguiclient/MySQL_AST_CREATE_tables.sql
ERROR:
Failed to open file '/usr/share/astguiclient/MySQL_AST_CREATE_tables.sql', error: 2
mysql> \. /usr/share/astguiclient/MySQL_AST_CREATE_tables.sql
ERROR:
Failed to open file '/usr/share/astguiclient/MySQL_AST_CREATE_tables.sql', error: 2
mysql> GRANT SELECT on asterisk.phones TO idcheck@'%' IDENTIFIED BY '1234';
ERROR 1146 (42S02): Table 'asterisk.phones' doesn't exist
mysql> \. /usr/share/astguiclient/MySQL_AST_CREATE_tables.sql
ERROR:
Failed to open file '/usr/share/astguiclient/MySQL_AST_CREATE_tables.sql', error: 2
mysql> \. /usr/share/astguiclient/MySQL_AST_CREATE_tables.sql
ERROR:

what could happen:

i view the directory /usr/share/ls ( no astguiclient directory)

what did i missed..


:)
ruben23
 
Posts: 1161
Joined: Thu Jul 31, 2008 10:35 am
Location: Davao City, Philippines

Postby mflorell » Thu Jan 15, 2009 5:17 pm

Depending on the version of MySQL and the permissions on your system you may have to move the SQL file to the mysql data directory to run it.
mflorell
Site Admin
 
Posts: 18406
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby williamconley » Thu Jan 15, 2009 8:16 pm

alternate method:

cd /usr/src/astguiclient (use your correct path here)
mysql asterisk < MySQL_AST_CREATE_tables.sql -u UUUU -pXXXXX

replace "UUUU" with the user (root, for instance) and XXXX with the user's mysql password (and no, there isn't a space between -p and XXXXX, and that's not a mistake).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # 888-883-8488 # +44(203) 769-2294
williamconley
 
Posts: 20427
Joined: Wed Oct 31, 2007 4:17 pm
Location: Bartow, FL (In the boondocks)

Postby ruben23 » Fri Jan 16, 2009 9:13 am

yes i got it...i just change the directory where the MySQL_AST_CREATE_tables.sql belongs

in me its /usr/src/astguiclient/extras/MySQL_AST_CREATE_tables.sql

then it runs...
ruben23
 
Posts: 1161
Joined: Thu Jul 31, 2008 10:35 am
Location: Davao City, Philippines


Return to Support

Who is online

Users browsing this forum: No registered users and 93 guests