Reputation: 3226
I am getting the following error on calling a MySql stored procedure from phpMyAdmin
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
I am using
call get_ledger_name(2007);
to call the procedure
I have tried changing password for root, creating a new user, but the error still prevails.
Upvotes: 2
Views: 2328
Reputation: 29051
Alter stored procedure with DEFINER=root@localhost and then call this SP. It will run.
Try this:
DELIMITER $$
DROP PROCEDURE IF EXISTS `sp_test`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_test`()
BEGIN
/* Your Code Snippet */
/* Your Code Snippet */
/* Your Code Snippet */
END$$
DELIMITER ;
Upvotes: 2
Reputation: 263683
Actually you can reset the root
password.
But keep in mind that it is not advisable to use root
account without password.
Upvotes: 1