Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hello Guys,

I don't have any problems when I was developing in my localhost computer but when I deploy the system I encounter problems in the database

This is the SQL Command:

SQL
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `jobslist_view` AS select `a`.`job_id` AS `job_id`,`a`.`position` AS `position`,`a`.`description` AS `description`,`a`.`date_posted` AS `date_posted`,`a`.`date_inactive` AS `date_inactive`,`a`.`number_of_vacancy` AS `number_of_vacancy`,`b`.`hospital_id` AS `hospital_id`,`b`.`hospital_name` AS `hospital_name`,`b`.`hospital_address` AS `hospital_address`,`b`.`hospital_phone` AS `hospital_phone`,`b`.`hospital_email` AS `hospital_email`,`c`.`realname` AS `realname`,`c`.`user_id` AS `user_id` from ((`jobs_tbl` `a` left join `hospitals_tbl` `b` on((`a`.`hospital_id` = `b`.`hospital_id`))) left join `users_tbl` `c` on((`a`.`user_id` = `c`.`user_id`))) where (`a`.`archive` = 0);


This is the error message
#1227 - Access denied; you need the SUPER privilege for this operation
You can also see the actual error message here:
Image

I don't have any problem in my local computer in performing that sql statement. But I am having problem when i upload it in my new hosting provider. I am not sure but I think this problem is from the hosting provider side because of user privilege. But I really want to ask idea from your side guys.

I try to change the user name and ipaddress that is given by the hosting provider but the outcome is still the same.

SQL
CREATE ALGORITHM=UNDEFINED DEFINER=`admin_user`@`125.5.102.200` SQL SECURITY DEFINER VIEW `jobslist_view` AS select `a`.`job_id` AS `job_id`,`a`.`position` AS `position`,`a`.`description` AS `description`,`a`.`date_posted` AS `date_posted`,`a`.`date_inactive` AS `date_inactive`,`a`.`number_of_vacancy` AS `number_of_vacancy`,`b`.`hospital_id` AS `hospital_id`,`b`.`hospital_name` AS `hospital_name`,`b`.`hospital_address` AS `hospital_address`,`b`.`hospital_phone` AS `hospital_phone`,`b`.`hospital_email` AS `hospital_email`,`c`.`realname` AS `realname`,`c`.`user_id` AS `user_id` from ((`jobs_tbl` `a` left join `hospitals_tbl` `b` on((`a`.`hospital_id` = `b`.`hospital_id`))) left join `users_tbl` `c` on((`a`.`user_id` = `c`.`user_id`))) where (`a`.`archive` = 0);



Thank You.
Posted
Updated 5-Aug-15 17:24pm
v2
Comments
PIEBALDconsult 5-Aug-15 23:13pm    
Can't you post the text of the error? Not many of us will click on an unknown link.
DamithSL 5-Aug-15 23:24pm    
run SELECT VERSION() and check the mysql version of your hosting provider
keniks143 5-Aug-15 23:26pm    
Hi, the current version of my hosting provider is 5.1.56-community
DamithSL 5-Aug-15 23:37pm    
have you tried without
ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER
keniks143 5-Aug-15 23:39pm    
Yes sir, I alrady try that but I get this error
#1142 - CREATE VIEW command denied to user 'hradmin'@'localhost' for table 'jobslist_view'

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900