Hi:

Me again with a problem in code that worked years ago.

User jalamior_user has all privileges. Accessing database with no problems.

This database had different name before. When host switched plesk to cPanel rghe had to rename data base ad everything else on a contraction jalamior including user. I set up new password to go with jalamior_user and it is working elsewhere in program.

jala-mi.org MySQL Account Maintenance Manage User Privileges

User: jalamior_user Database: jalamior_assoc_mgr

ALL PRIVILEGES ALTER ALTER ROUTINE CREATE CREATE ROUTINE CREATE TEMPORARY TABLES CREATE VIEW DELETE DROP EVENT EXECUTE INDEX INSERT LOCK TABLES REFERENCES SELECT SHOW VIEW TRIGGER UPDATE

Error message: Sun Mar 12 18:48:05 2017 update_tables-development.cgi: Unable to execute query: Access denied for user 'jalamior_user'@'localhost' (using password: YES) at update_tables-development.cgi line 124.

Did search on this issue (many responses). username and password are correct as evidenced by their success in other parts of program

Error produced in the sub:

Suggestions welcomed

#------------------------------------------------------- # Clear User Table Then Add New Data From Delimited File #------------------------------------------------------- sub UpdateUserTable { my $dbh = shift; my ($sth, $stmt); warn("Entered sub UpdateUserTable"); $stmt = "DELETE FROM users"; $sth = $dbh->prepare ($stmt); $sth->execute () or die "Unable to execute query: " . $sth->err +str; $stmt = "LOAD DATA INFILE '/home/jalamior/public_html/httpsdocs +/securefiles/accesscontrol.txt' INTO TABLE users FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'"; $sth = $dbh->prepare ($stmt); $sth->execute () or die "Unable to execute query: " . $sth->errstr +; }

my $dbh = manageusers::OpenConnection();

This is connection used all over successfully.

This is call to sub

if ($action eq "updatetable_3") { warn("Entered update_tables.cgi with action = UpdateTable_3"); UpdateUserTable($dbh); }

In reply to MySQL access denied by tultalk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.