Sponsored Content
Top Forums Shell Programming and Scripting Trying to connect MYSQL server from HP-UX Post 302350850 by pdemong on Saturday 5th of September 2009 07:12:19 PM
Old 09-05-2009
durden_tyler is right : you must have a mysql client installed on your HP-UX scripting machine. If not, you've got a problem. And nothing has to be configured on your linux (MySQL) box, except the point of Neo.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use Perl's DBI connect when no mysql passwd is set?

I am getting the error "Can't call method "prepare" on an undefined value at..." with the following code: <code>my %dbh; my $dbh = DBI->connect("DBI:mysql:Customer_Data", $username, $password ) or die "Database connection... (1 Reply)
Discussion started by: vincaStar
1 Replies

2. Shell Programming and Scripting

connect to MySQL from Perl using DBI

Hi, I want to connect perl with the mysql to select and so on but the connection don't work code #!/usr/bin/perl BEGIN { # PERL MODULES WE WILL BE USING use DBI; $dbh = DBI->connect('DBI:mysql:C:\Program Files\MySQL\MySQL Server 5.0\data\db1','','pass') or die $DBI::errstr;} #... (1 Reply)
Discussion started by: eng_shimaa
1 Replies

3. UNIX for Dummies Questions & Answers

Connect MySQL database from Unix

How to connect a MySQL database from unix using unix shell scripting ( people are using perl scrpt to connect the same database). I want to access a MySQL database through a shell script (4 Replies)
Discussion started by: apsprabhu
4 Replies

4. Debian

Connect MySQL databse to debian

Hello, I wont to connect a MySQL database to debian: I have installed libmyodbc package and after i have configured /etc/odbcinst.ini: Description = MySQL driver Driver = /usr/lib/odbc/libmyodbc.so Setup = /usr/lib/odbc/libodbcmyS.so and /etc/odbc.ini : Description =... (0 Replies)
Discussion started by: linux31
0 Replies

5. Linux

Generate public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (0 Replies)
Discussion started by: sridhardwh
0 Replies

6. UNIX for Advanced & Expert Users

Public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (1 Reply)
Discussion started by: sridhardwh
1 Replies

7. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

8. Linux

How to connect Linux server (configure two way authentication) with Windows server?

Hi my name is Manju. ->I have configure the two way authentication on my linux server. ->Now I am able to apply two way authenticator on particuler user. ->Now I want to map this linux server to my AD server. ->Kindly tell me how to map AD(Active Directory) with this linux server. ... (0 Replies)
Discussion started by: manjusharma128
0 Replies

9. Shell Programming and Scripting

Help Required - facing error when trying to connect to a mysql by ssh to another server

Hi i am new to unix shell scripting i have the below requirement connect to server B and then connect to mysql in the server B and query for a particular record and capture that value but when i perform this i am facing an error can u guys help me on this:confused::confused: ... (2 Replies)
Discussion started by: Hamdul
2 Replies

10. Programming

Unable to connect mysql with php7 in Linux 7

I am getting below error on executing the code. < <?php $dbname = 'upload_ui'; $dbuser = 'nad'; $dbpass = 'nad'; $dbhost = '10.196.84.192'; $link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); } ?> -->error: < PHP Warning: PHP Startup:... (2 Replies)
Discussion started by: nadeemrafikhan
2 Replies
GAMMU-SMSD-MYSQL(7)						       Gammu						       GAMMU-SMSD-MYSQL(7)

NAME
gammu-smsd-mysql - gammu-smsd(1) backend using MySQL database server as a message storage DESCRIPTION
MYSQL backend stores all data in a MySQL database server, which parameters are defined by configuration (see gammu-smsdrc for description of configuration options). For tables description see gammu-smsd-tables. This backend is based on gammu-smsd-sql. CONFIGURATION
Before running gammu-smsd you need to create necessary tables in the database, which is described bellow. The configuration file then can look like: [smsd] service = sql driver = native_mysql host = localhost See also gammu-smsdrc PRIVILEGES
The user accessing the database does not need much privileges, the following privleges should be enough: GRANT USAGE ON *.* TO 'smsd'@'localhost' IDENTIFIED BY 'password'; GRANT SELECT, INSERT, UPDATE, DELETE ON `smsd`.* TO 'smsd'@'localhost'; Note For creating the SQL tables you need more privileges, especially for creating triggers, which are used for some functionality. CREATING TABLES
SQL script for creating tables in MySQL database: -- phpMyAdmin SQL Dump -- version 2.8.0.3 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 10, 2006 at 11:08 PM -- Server version: 5.0.18 -- PHP Version: 5.1.3 -- -- Database: `smsd` -- -- -------------------------------------------------------- -- -- Table structure for table `daemons` -- CREATE TABLE `daemons` ( `Start` text NOT NULL, `Info` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `daemons` -- -- -------------------------------------------------------- -- -- Table structure for table `gammu` -- CREATE TABLE `gammu` ( `Version` integer NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `gammu` -- INSERT INTO `gammu` (`Version`) VALUES(13); -- -------------------------------------------------------- -- -- Table structure for table `inbox` -- CREATE TABLE `inbox` ( `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `ReceivingDateTime` timestamp NOT NULL default '0000-00-00 00:00:00', `Text` text NOT NULL, `SenderNumber` varchar(20) NOT NULL default '', `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression', `UDH` text NOT NULL, `SMSCNumber` varchar(20) NOT NULL default '', `Class` integer NOT NULL default '-1', `TextDecoded` text NOT NULL default '', `ID` integer unsigned NOT NULL auto_increment, `RecipientID` text NOT NULL, `Processed` enum('false','true') NOT NULL default 'false', PRIMARY KEY `ID` (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `inbox` -- -- -------------------------------------------------------- -- -- Table structure for table `outbox` -- CREATE TABLE `outbox` ( `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `InsertIntoDB` timestamp NOT NULL default '0000-00-00 00:00:00', `SendingDateTime` timestamp NOT NULL default '0000-00-00 00:00:00', `SendBefore` time NOT NULL DEFAULT '23:59:59', `SendAfter` time NOT NULL DEFAULT '00:00:00', `Text` text, `DestinationNumber` varchar(20) NOT NULL default '', `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression', `UDH` text, `Class` integer default '-1', `TextDecoded` text NOT NULL default '', `ID` integer unsigned NOT NULL auto_increment, `MultiPart` enum('false','true') default 'false', `RelativeValidity` integer default '-1', `SenderID` varchar(255), `SendingTimeOut` timestamp NULL default '0000-00-00 00:00:00', `DeliveryReport` enum('default','yes','no') default 'default', `CreatorID` text NOT NULL, PRIMARY KEY `ID` (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE INDEX outbox_date ON outbox(SendingDateTime, SendingTimeOut); CREATE INDEX outbox_sender ON outbox(SenderID); -- -- Dumping data for table `outbox` -- -- -------------------------------------------------------- -- -- Table structure for table `outbox_multipart` -- CREATE TABLE `outbox_multipart` ( `Text` text, `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression', `UDH` text, `Class` integer default '-1', `TextDecoded` text default NULL, `ID` integer unsigned NOT NULL default '0', `SequencePosition` integer NOT NULL default '1', PRIMARY KEY (`ID`, `SequencePosition`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `outbox_multipart` -- -- -------------------------------------------------------- -- -- Table structure for table `pbk` -- CREATE TABLE `pbk` ( `ID` integer NOT NULL auto_increment, `GroupID` integer NOT NULL default '-1', `Name` text NOT NULL, `Number` text NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `pbk` -- -- -------------------------------------------------------- -- -- Table structure for table `pbk_groups` -- CREATE TABLE `pbk_groups` ( `Name` text NOT NULL, `ID` integer NOT NULL auto_increment, PRIMARY KEY `ID` (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `pbk_groups` -- -- -------------------------------------------------------- -- -- Table structure for table `phones` -- CREATE TABLE `phones` ( `ID` text NOT NULL, `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `InsertIntoDB` timestamp NOT NULL default '0000-00-00 00:00:00', `TimeOut` timestamp NOT NULL default '0000-00-00 00:00:00', `Send` enum('yes','no') NOT NULL default 'no', `Receive` enum('yes','no') NOT NULL default 'no', `IMEI` varchar(35) NOT NULL, `Client` text NOT NULL, `Battery` integer NOT NULL DEFAULT -1, `Signal` integer NOT NULL DEFAULT -1, `Sent` int NOT NULL DEFAULT 0, `Received` int NOT NULL DEFAULT 0, PRIMARY KEY (`IMEI`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Dumping data for table `phones` -- -- -------------------------------------------------------- -- -- Table structure for table `sentitems` -- CREATE TABLE `sentitems` ( `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `InsertIntoDB` timestamp NOT NULL default '0000-00-00 00:00:00', `SendingDateTime` timestamp NOT NULL default '0000-00-00 00:00:00', `DeliveryDateTime` timestamp NULL, `Text` text NOT NULL, `DestinationNumber` varchar(20) NOT NULL default '', `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression', `UDH` text NOT NULL, `SMSCNumber` varchar(20) NOT NULL default '', `Class` integer NOT NULL default '-1', `TextDecoded` text NOT NULL default '', `ID` integer unsigned NOT NULL default '0', `SenderID` varchar(255) NOT NULL, `SequencePosition` integer NOT NULL default '1', `Status` enum('SendingOK','SendingOKNoReport','SendingError','DeliveryOK','DeliveryFailed','DeliveryPending','DeliveryUnknown','Error') NOT NULL default 'SendingOK', `StatusError` integer NOT NULL default '-1', `TPMR` integer NOT NULL default '-1', `RelativeValidity` integer NOT NULL default '-1', `CreatorID` text NOT NULL, PRIMARY KEY (`ID`, `SequencePosition`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE INDEX sentitems_date ON sentitems(DeliveryDateTime); CREATE INDEX sentitems_tpmr ON sentitems(TPMR); CREATE INDEX sentitems_dest ON sentitems(DestinationNumber); CREATE INDEX sentitems_sender ON sentitems(SenderID); -- -- Dumping data for table `sentitems` -- -- -- Triggers for setting default timestamps -- DELIMITER // CREATE TRIGGER inbox_timestamp BEFORE INSERT ON inbox FOR EACH ROW BEGIN IF NEW.ReceivingDateTime = '0000-00-00 00:00:00' THEN SET NEW.ReceivingDateTime = CURRENT_TIMESTAMP(); END IF; END;// CREATE TRIGGER outbox_timestamp BEFORE INSERT ON outbox FOR EACH ROW BEGIN IF NEW.InsertIntoDB = '0000-00-00 00:00:00' THEN SET NEW.InsertIntoDB = CURRENT_TIMESTAMP(); END IF; IF NEW.SendingDateTime = '0000-00-00 00:00:00' THEN SET NEW.SendingDateTime = CURRENT_TIMESTAMP(); END IF; IF NEW.SendingTimeOut = '0000-00-00 00:00:00' THEN SET NEW.SendingTimeOut = CURRENT_TIMESTAMP(); END IF; END;// CREATE TRIGGER phones_timestamp BEFORE INSERT ON phones FOR EACH ROW BEGIN IF NEW.InsertIntoDB = '0000-00-00 00:00:00' THEN SET NEW.InsertIntoDB = CURRENT_TIMESTAMP(); END IF; IF NEW.TimeOut = '0000-00-00 00:00:00' THEN SET NEW.TimeOut = CURRENT_TIMESTAMP(); END IF; END;// CREATE TRIGGER sentitems_timestamp BEFORE INSERT ON sentitems FOR EACH ROW BEGIN IF NEW.InsertIntoDB = '0000-00-00 00:00:00' THEN SET NEW.InsertIntoDB = CURRENT_TIMESTAMP(); END IF; IF NEW.SendingDateTime = '0000-00-00 00:00:00' THEN SET NEW.SendingDateTime = CURRENT_TIMESTAMP(); END IF; END;// DELIMITER ; Note You can find the script in docs/sql/mysql.sql as well. UPGRADING TABLES
The easiest way to upgrade database structure is to backup old one and start with creating new one based on example above. For upgrading existing database, you can use changes described in smsd-tables-history and then manually update Version field in gammu ta- ble. AUTHOR
Michal iha <michal@cihar.com> COPYRIGHT
2009-2012, Michal iha <michal@cihar.com> 1.31.90 February 24, 2012 GAMMU-SMSD-MYSQL(7)
All times are GMT -4. The time now is 12:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy