Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Authentication Failing In Perl DBI Script


#! /usr/bin/perl

use DBI ;
use strict ;

use CGI ;
my ($cgi) = new CGI ;

my ($dsn)="DBI:mysql:dr:localhost";
my ($user_name) = "fubar" ;
my ($password) = "secret" ;
my ($dbh,$sth) ;
my (@ary) ;

$dbh = DBI->connect ($dsn, $user_name, $password, { RaiseError => 1 });

, and on MySQL, at the command prompt, I've typed this:

grant all on *.* to fubar identified by "secret" ;




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Mysql_connect Is Failing
This seems a little ridiculous. But I don't know how to connect to my db on a real server. I've been developing on my computer and connecting has been to localhost with no password or user. Now that I have everything uploaded to the real server I don't know what I am supposed to use to connect.

The host is godaddy. The database is alaskaerrands. I have a username and password but if I put godaddy.com as the host the page just sits there do something; but who knows what?

View Replies !   View Related
PHP Failing To Output First Row
I'm using the following code to output the contents of my database, which is working fine apart from the fact that it seems to be ignoring the first result.

$sql=mysql_connect ($host, $user, $pass) or die (mysql_error());
mysql_select_db ($data) or die (mysql_error());
$result = mysql_query ("SELECT tag, name, description FROM `tricktionary` WHERE alpha='a' ORDER BY `name` ASC") or die(mysql_error());
$trick = mysql_fetch_array ($result);

while($trick = mysql_fetch_array($result)){
echo '<div class="focus"><h2 id="'. $trick['tag'] .'">'. $trick['name'] .'</h2><p>'. $trick['description'] .'</p></div>';}

I've triple checked that the actual database entry in question has a value of 'a' for 'alpha', which it does, so is there something wrong with the while statement?

View Replies !   View Related
PHP Mysql_connect Randomly Failing
I've got a library of PHP code whose first line is a mysql_connect
statement, like this:

$dbh=mysql_connect() or die("mysql connect failed: $php_errmsg");

Approximately 1% of the time it just fails, for no stated reason:

Warning: mysql_connect() [http://www.php.net/function.mysql-connect]:
in /var/httpd/htdocs/pi/pi.php on line 3
mysql connect failed:



View Replies !   View Related
Query Failing With Indexed (or Not)
I've got a bit of an issue here I'm hoping somebody will be able to help me with.

I have a large DB (1 million plus rows) and need to do a query with dual 'order by' AND limit.

I haven't found a good way of doing this efficiently.

If you would like to get a better idea of what I'm running,

Basically what I have is a table for bands, and a table for concerts. Here's a simplified version of the query (so too keep it concise and hopefully not overload with unnecessary info).

My 'SELECT' statement looks like this
Expand|Select|Wrap|Line Numbers

View Replies !   View Related
Mysqldump Restore Failing
I created a backup of my database with mysqldump.
I then installed a new server, and restored succesfully the database.
After this, for some reason I deleted the database (mysql drop database), and created it again (mysql create database).
Now I cannot anymore restore the database with mysqldump.
What is the reason?
The original *.sql file is exactly the same as it used to be.
The mysqldump restore stops after the "SETs" as below, and just doesn't continue. no errors or warnings given.

code: .....

View Replies !   View Related
View Insertion Failing
I am trying to insert into a view named 'request_files_v'. I get the error

"SQLSTATE[HY000]: General error: 1471 The target table request_files_v of the INSERT is not insertable-into".

I am giving the insert command from the same userid that had been used to define the view. Also, in information_schema.VIEWS, I see that the 'IS_UPDATABLE' field for this view is 'YES'.

What could be the possible reason I am not able to insert into this view?

View Replies !   View Related
Re-created Table Failing
Re-created a table in my database.
All field names and values are identical to the original table.
Table name is correct too.

Now the web-pages will not store data to the table.

View Replies !   View Related
BLOB Update Failing On SQLParamData
trying to update a BLOB column using SQLParamData / SQLPutData and it all
works fine until the BLOB is > ~700KB. I'm putting it in 1KB chunks, but I
have also tried 2KB without success. The SQLPutdata succeeds, but when the
final SQLParamData is called SQL_ERROR is returned and the log file shows:

DIAG [S1000] [MySQL][ODBC 3.51 Driver][mysqld-4.1.8-standard]Lost connection
to MySQL server during query (2013)

my.cnf cantains the following:

set-variable = key_buffer_size=16M
set-variable = max_allowed_packet=1M

View Replies !   View Related
Failing To Import An Export From PhpMyAdmin
My hosting company has MySQL 5 and so do I on my local Fedora Core 5
Linux machine. However, when I import a dump file from their
enviornment into mine, I get this error

ERROR 1064 (42000) at line 21428: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'TABLE `EC_SAVED_ORDER_LINE_ITEMS`
ADD CONSTRAINT `FK1_SAVED_ORDER_LINE_ITEMS` ' at line 3

This is the line (and those around it) from my file. It is complaining
about the first line. What is the problem? Code:

View Replies !   View Related
Update Failing With Error 1062
I issue an update statement containing a where clause on the primary index, so as to update a single record. Howerver this is failing with "Duplicate entry '6' for key 1" -
update clients.calendarentry
set Subject = 'presentation'
where idCalendarEntry = 6;

In the table, the field 'idCalendarEntry' is declared as :
`idCalendarEntry` int(10) unsigned NOT NULL auto_increment

The server version of MySql I am using is 5.0.24
The client version of MySql I am using is 5.0.11

View Replies !   View Related
Failing To Import A Group Of Rows From One Table To Another
DELETE FROM table WHERE entry=193981;
INSERT INTO table SELECT * FROM old.table WHERE entry=193981;

However this time I've run into the following error:
ERROR 1062 : Duplicate entry '36134' for key 1

View Replies !   View Related
Mysqld Failing At /etc/init.d/mysql Start
having trouble starting mysql after reboot. it didnt start at reboot and wont start now.

gonna paste some info that "may" help in informing what the problem is but i just dont know where to go from there.

Code:

/etc/init.d/mysql start
* Starting MySQL database server mysqld [fail]

sudo cat /var/log/syslog|tail -n 100
Jan 4 05:41:12 centr0 mysqld[4544]: 090104 5:41:12 [ERROR] Do you already have another mysqld server running on port: 3306 ?
Jan 4 05:41:12 centr0 mysqld[4544]: 090104 5:41:12 [ERROR] Aborting
Jan 4 05:41:12 centr0 mysqld[4544]:
Jan 4 05:41:12 centr0 mysqld[4544]: 090104 5:41:12 InnoDB: Starting shutdown...
Jan 4 05:41:14 centr0 mysqld[4544]: 090104 5:41:14 InnoDB: Shutdown completed; log sequence number 0 43655
Jan 4 05:41:14 centr0 mysqld[4544]: 090104 5:41:14 [Note] /usr/sbin/mysqld: Shutdown complete
Jan 4 05:41:14 centr0 mysqld[4544]:
Jan 4 05:41:14 centr0 mysqld_safe[4566]: ended
Jan 4 05:41:27 centr0 /etc/init.d/mysql[4707]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Jan 4 05:41:27 centr0 /etc/init.d/mysql[4707]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
Jan 4 05:41:27 centr0 /etc/init.d/mysql[4707]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Jan 4 05:41:27 centr0 /etc/init.d/mysql[4707]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Jan 4 05:41:27 centr0 /etc/init.d/mysql[4707]:
Jan 4 05:41:59 centr0 mysqld_safe[4783]: started
Jan 4 05:41:59 centr0 mysqld[4786]: 090104 5:41:59 InnoDB: Started; log sequence number 0 43655
Jan 4 05:41:59 centr0 mysqld[4786]: 090104 5:41:59 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
Jan 4 05:41:59 centr0 mysqld[4786]: 090104 5:41:59 [ERROR] Do you already have another mysqld server running on port: 3306 ?
Jan 4 05:41:59 centr0 mysqld[4786]: 090104 5:41:59 [ERROR] Aborting
Jan 4 05:41:59 centr0 mysqld[4786]:
Jan 4 05:41:59 centr0 mysqld[4786]: 090104 5:41:59 InnoDB: Starting shutdown...
Jan 4 05:42:00 centr0 mysqld[4786]: 090104 5:42:00 InnoDB: Shutdown completed; log sequence number 0 43655
Jan 4 05:42:00 centr0 mysqld[4786]: 090104 5:42:00 [Note] /usr/sbin/mysqld: Shutdown ....

View Replies !   View Related
Modify Table Engine Type Failing.
I keep getting the following error when trying to change the tables engine type. Why is this failing and how can I fix it?

mysql> ALTER TABLE trade_messages ENGINE = INNODB;
Query OK, 827793 rows affected, 1 warning (1 min 3.90 sec)
Records: 827793 Duplicates: 0 Warnings: 0
mysql> SHOW WARNINGS;
+---------+------+--------------------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------------------+
| Warning | 1266 | Using storage engine MyISAM for table 'trade_messages' |
+---------+------+--------------------------------------------------------+
1 row in set (0.00 sec)


View Replies !   View Related
Perl DBI / SQL
I need to know how to retrieve through Perl DBI a listing of possible ENUM
elements from a field for processing under a CGI script. If all I need for
this is some form of SELECT statement, please provide a code snippet of this
so I can do it.

I want to make my code so I'm not having to edit hard-coded Perl CGI scripts
if/when I add new elements to the ENUM field.

View Replies !   View Related
PHP Or Perl?
As part of my own learning mysql project I'm planning to build
databases for all my books and DVD's. Stephen Hawking is probably
a better typist than I am so I plan to use barcodes to get the info
,taking the information from various web sites.

People tell me that PHP is THE way to do database work with mysql.
The thing is, I'm familiar with Perl and it has all kinds of neat
string manipulation stuff and LWP.

Does PHP have comprable libraries (especially LWP) and how difficult
is it to move from Perl.

View Replies !   View Related
Fw: PHP Or Perl?
Do've an example on using Rebol to connect to mySQL via TCP/IP?
How do you do it? How do you execute SQL quieries? Return results etc ?
Do you use some kind of "middleware" that your communicating to from Rebol
via TCP/IP which gets the data for you?I'm actually a Delphi, Java, VB, Perl & Ruby developer (done alittle Rebol
before) but found it strange that your using TCP/IP to communicate with
mySQL



View Replies !   View Related
Authentication
I'm new with mysql and I feel very stupid for having to ask this but I'm trying to program against it and I don't know what my username and pw are. When I installed it, I put in a pw so I'm pretty sure I know what that is, but what is the username I should be using when trying to execute sql commands against it with php?

View Replies !   View Related
Select Via Perl
I am trying to read a file and see if the contents of it exists in the DB or not and am trying to do it via a Select.I try to do a select * into outfile /tmp/result.txt from table where field like "%$var%"; but it always goes through the first two lines of the input file and then says the file already exists. Is this because I read each line of a file in a for loop in perl and the mysql query tries to recreate the outfile each time? Is there any other way I can dump the results of the select to a file of some sort?

View Replies !   View Related
PHP Or Perl? (or Rebol Via TCP/IP)
Do've an example on using Rebol to connect to mySQL via TCP/IP?

How do you do it? How do you execute SQL quieries? Return results etc ?
Do you use some kind of "middleware" that your communicating to from Rebol
via TCP/IP which gets the data for you?

I'm actually a Delphi, Java, VB, Perl & Ruby developer (done alittle Rebol
before) but found it strange that your using TCP/IP to communicate with
mySQL.

View Replies !   View Related
MySQL, Perl CGI
I'm developing a simple computer helpdesk system with MySQL as the
backend and Apache/CGI/Perl as the user interface. I've sucessfully
set up the part where a user enters an issue via HTML form and
"submits" it to the MySQL database. My question is: I have it set up
where the user posts the issue to the database, the database
auto_increments an issue_id number field. How do I return that
issue_id number back to Apache so that the user can see it (and use it
as a reference number)?

View Replies !   View Related
Perl-DBD-MySQL
I have a binary distribution of MySQL 4.0.20 installed in
/usr/local/mysql.
Therefore, the only libmysqlclient file I have is libmysqlclient.a
(static library).
And also, Perl:DBI already installed.

I'm trying to install perl-DBD-MySQL-2.9004 from source.
What should I add to 'perl Makefile.PL' as arguments to make sure it
finds the
static library?

I've tried 'perl Makefile.PL
--libs=/usr/local/mysql/lib/libmysqlclient.a and gotten
this:

---------------------------------

[root@localhost DBD-mysql-2.9004]# perl Makefile.PL
--libs=/usr/local/mysql/lib/lib/mysqlclient.a
I will use the following settings for compiling and testing:

cflags (mysql_config) = -I/usr/include -mcpu=pentiumpro
libs (Users choice) =
/usr/local/mysql/lib/lib/mysqlclient.a
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testuser (default ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Unrecognized argument in LIBS ignored:
'/usr/local/mysql/lib/lib/mysqlclient.a'
Using DBI 1.30 installed in
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBI
Writing Makefile for DBD::mysql
[root@localhost DBD-mysql-2.9004]#
---------------------------------
What should I do to get DBD-MySQL to install correctly?

View Replies !   View Related
Error In Perl
I receive the following error when I try to acces MySQL 4.1

Client does not support authentication protocol requested by server; consider upgrading MySQL client

I conntect with Perl in this way : $dbh = DBI->connect("DBI:mysql:dbname:localhost","dbuser","dbpass") or print"I can't connect" .DBI->errstr;;

View Replies !   View Related
Uninstall Perl (DBI)
i try to install Mysql Server V5 on a Redhat 5 Enterprise.

But the RPM needs Perl (DBI) so I install it following the install guide provide on this site. But it' seems to not be detected by the rpm package when installed.

View Replies !   View Related
Using Perl With Mysql
I have heard that if you want a view with mysql, perl is one iof the best applications to use. I want to make a user interface with perl that will prompt the user to enter values and then those values will be stored into the database. I'm just started to learn how to use perl, can anyone give me a little help with writing the code?

View Replies !   View Related
Perl Dbi And Bitfields
In the past I encoded some bit fields into hex and stored them in a short string. I now want to be able to use sql to select records according to settings of various 'flags'. So I have changed the field to a bit field and have succeded in populating it.

I can display the vaules using bin(flags+0) as a string of 1 & 0s but when I try to get the value back into a perl variable from a select * it always comes back as 0?

View Replies !   View Related
Can't Get Perl To Connect
I am just trying to connect and it wont give real errors like PHP it just says internal server error.

#!/usr/bin/perl
use warnings;
use strict;
use DBI;

$dsn = 'dbi:mysql:dbname=Location_Test';
$user = 'lmayer';
$password = '*******';
$dbh = DBI->connect($dsn, $user, $password,
{ RaiseError => 1, AutoCommit => 0 })

I can't make this work at all. I know its configured correctly since all the other pages work. I connect fine at the command line so I know the username and password work.

View Replies !   View Related
Perl Script
Is it possible to have MySQL execute a Perl script? I need to run the script upon insertion of a row into a MySQL table.
I've seen myperl, but that appears to execute Perl syntax from within MySQL and won't meet our needs

View Replies !   View Related
Authentication To MySQL
i have one problem with l'authentication to the MySQL;
I am using the language Java and i access to the data-base in following

db = DriverManager.getConnection("jdbc:mysql://localhost:3306/" +
nomeDB + "?user=" + nomeUtente + "&password=" + pwdUtente);

but I do not want insert pwdUtente and nomeUtente in the source-code,
What can i do?

View Replies !   View Related
Encryption / Authentication
I need to find out if it's possible to do two things with mysql. The =
first is external authentication, preferably with kerberos5, but PAM =
will work as well. Second, encrypting the data stream. Specifically =
with jdbc connections.

View Replies !   View Related
MySQL And PHP Authentication
I'm getting the following error while trying to connect via php to an existant mysql (local) server:

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client.
I have latest PHP and MySQL installed.

This seems like the password problem (new password system now) the older was 16 bits right? Thing is... My PHP should support this, its 5.x and I have latest mysql as well.

View Replies !   View Related
Support Authentication
i have installed php4.4 with iis and mysql5 and phpmyadmin is 2.5 version and mysql administration tool too i get the error client does not support authentication protocol,
i will be very pleased if someone suggest a good workin version for all mysql php and phpmyadmin

View Replies !   View Related
User Authentication
I do know how to create user logins and such.what I need to know is once a user logs in and submits his data (CSV) to Mysql DB,how do i ensure that the data goes into his account.In other words,whats the best way to manage user accounts and control the data that goes into that.

View Replies !   View Related
Windows Authentication
I would like to a Windows Authentication with MySQL (similar to the Windows Authentication available for SQL Server).

Does anyone knows how it can be done?

View Replies !   View Related
How To Log Authentication Failures ONLY?
I am trying to figure out how I can log _only_ authentication failures with mysql.

It appears to me, that I can only either log all queries and mysqld errors, or only mysqld errors?

I have tried in my.cnf:

[mysqld]
log = /var/log/mysql/access.log
log_error = /var/log/mysql/error.log
log_warnings = 1

But this logs every single query made, which I don't want, as it fills up the log files too much.

If I do only
[mysqld]
log_error = /var/log/mysql/error.log
log_warnings = 1

or...
[mysqld]
log_error = /var/log/mysql/error.log
log_warnings = 2

... then I get only mysqld errors, but nothing related to authentication failures.

Is there a way to configure this?

View Replies !   View Related
Passwords / Authentication
I have just started messing around with MySQL and something I find weird is that we connecting using localhost, if I supply the password, it will not authenticate...if I leave the password off, it's fine.If I connect from another machine, it requires the password or it will not authenticate.Is that normal?

View Replies !   View Related
Slow Authentication
MySQL V 5.0.18 on SUSE 10.1

I'm not a complete *nix noob, but I sure as hell ain't a *nix or MySQL pro.

This is a new installation. Everything screaming fast. Unless it deals w/authentication.

Try to get in w/SQLyog from W2K locally ... intitial connection takes ~20 seconds. Then everything screaming fast.

Web Server (W03) attempts to connect via MyODBC ... same result ... initial connection takes ~20 seconds. Subsequent queries screaming fast.

VNC into the box at any time ... everything fast. (would seem to eliminate network/connection issues)

View Replies !   View Related
Perl DBD::mysql - Using Arrayref
I have an app where I would like to display a returned table with column
headings as specified in the inquiry (select), while preserving the
column sequence of columns as specified in the original inquiry -
without having access to the original inquiry.

If I use the fetchrow_hashref method, I can determine the column
headings, but I lose the sequence. If I use fetchrow_arrayref, I
preserve the sequence, but I lose the column headings. I suspect there
is an easy answer. Anybody have it?

View Replies !   View Related
Dealing With Mysql Through Perl
i'm working with a mySql database. i have accessed the database through perl.
now i want to know how i can store images in the databases through perl and how to retrieve it..
does anyone have an idea abt this?

View Replies !   View Related
Perl And Mysql Datetime
I am trying to have an update form for a datetime field. I've been looking all morning and haven't been able to find any examples of how to do it.
I have the date in the form formatted by perl like this: 08-14-2006 11:29:28 and when I do the update to mysql nothing happens. It does not work.
I need to make it so the user can put the time the student left.

View Replies !   View Related
Perl And Mysql 5, Can't Connect
I have installed perl 5.8.8 and mysql 5. My perl scripts don't work with mysql.
Do I need to do something more for perl and mysql 5 to work together?

View Replies !   View Related
How To Upload Images With Perl
I want to upload an image from a form, store it in the db, then retrieve it and display it on an HTML page. I am looking for a Perl code example to do the store and retrieve.

View Replies !   View Related
Perl/mysql On Linux
i am not getting the output for the following code (given below) in apache server on linux.
but i do get ouput in perl interpreter please replay me .
vinaykumarms@rediffmail.com





#!/usr/bin/perl
print "ContentType: text/plain

";

use DBI;

# Connecting to the database
# Replace DATABASENAME with the name of the database,
# HOSTNAME with the hostname/ip address of the MySQL server.
$drh = DBI->install_driver("mysql");
$dsn = "DBI:mysql:database=vinay;host=localhost";
$dbh = DBI->connect($dsn,"","");

# Select the data and display to the browser

my $sth = $dbh->prepare("SELECT * FROM login");
$sth->execute();
while (my $ref = $sth->fetchrow_hashref()) {
print "Found a row: id = $ref->{'id'}, name = $ref->{'name'}
";
}

$sth->finish();

# Disconnect from the database.

$dbh->disconnect();

View Replies !   View Related
Getting Last Auto Increment ID (perl DBI)
i am inserting a new line into a table with an auto incremented unique ID. after that i want to add a row to another table that will cross reference with using the ID from the first.

what is a reliable method of performing this? selecting the highest ID is open to possible race errors so i'm not keen to do it that way. can it be done in one line?

View Replies !   View Related
Can MySQL Use Windows Authentication?
Can MySQL use windows authentication?

If so, what are the changes to the connection string for this?

View Replies !   View Related
Support Authentication Protocol
I have a service provider where my mySQL database is being held. Everything is uploaded and ready to go. When i try to access the database via my ASP code i get the following error message:

Client does not support authentication protocol requested by server; consider upgrading MySQL client

I've heard to use the Password/ Old password functions, but who has to do that, me or the service provider? When i try to use the Command prompt from the MySQL administrator it won't let me access the command prompt.

View Replies !   View Related
PhpMyAdmin :: Http Authentication
How do you get http' authentication to work with phpMyAdmin?? Every time I tried using that i can't login.

using
WIN XP PRO
Apache 2,
phpMyAdmin2.6.0-pl3,
php 4.3.10
mysql 4.1

View Replies !   View Related
Authentication :: Config File?
Is there any config file or update to have MySQL use HPUX authentication or NT authentication. for the Windows apps. (Query browser and MySQL Administrator)

View Replies !   View Related
Authentication / Permission Basics
I have a number of users like 'fred', who can access MySQL 4.1 from %.fredworld.com. He has full access to his own database, fred. No other permissions defined.

What's the best way for me to allow every user to connect from localhost. After reading up on http://dev.mysql.com/doc/refman/4.1/en/connection-access.html I thought the answer might be to do:

insert into user (host, user) values ('localhost', '');
flush privileges;

but this doesn't do what I want. How should I go about this?

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved