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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |