Skip to main content
corrected spelling, fixed grammer.
Source Link
Sayed Mohd Ali
  • 2.2k
  • 3
  • 13
  • 31

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using a mysqlMySQL database then enter into the database through terminal or the UI provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the phpPHP page. The second thing to do is to flush the privileges so that the mysqlMySQL refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANT.

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using a mysql database then enter into the database through terminal or the UI provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the php page. The second thing to do is to flush the privileges so that the mysql refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANT.

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using a MySQL database then enter into the database through terminal or the UI provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the PHP page. The second thing to do is to flush the privileges so that the MySQL refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANT.

Grammar improvement(s)
Source Link
Nae
  • 15.1k
  • 7
  • 58
  • 82

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using a mysql database. then enter into the database through terminal or the uiUI provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the php page. The second thing to do is to flush the privileges so that the mysql refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANT.

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using mysql database. then enter into the database through terminal or the ui provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the php page. The second thing to do is to flush the privileges so that the mysql refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANT.

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using a mysql database then enter into the database through terminal or the UI provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the php page. The second thing to do is to flush the privileges so that the mysql refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANT.

deleted 13 characters in body
Source Link
Your Common Sense
  • 157.6k
  • 42
  • 220
  • 354

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using mysql database. then enter into the database through terminal or the ui provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the php page. The second thing to do is to flush the privileges so that the mysql refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flushflush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANTGRANT.

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using mysql database. then enter into the database through terminal or the ui provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the php page. The second thing to do is to flush the privileges so that the mysql refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANT.

The simple alternative to this problem could be solved by granting appropriate permissions in the database itself. For example: if you are using mysql database. then enter into the database through terminal or the ui provided and just follow this command:

 GRANT SELECT, INSERT, DELETE ON database TO username@'localhost' IDENTIFIED BY 'password';

This will restrict the user to only get confined with the specified query's only. Remove the delete permission and so the data would never get deleted from the query fired from the php page. The second thing to do is to flush the privileges so that the mysql refreshes the permissions and updates.

FLUSH PRIVILEGES; 

more information about flush.

To see the current privileges for the user fire the following query.

select * from mysql.user where User='username';

Learn more about GRANT.

URL fixed, no longer yields 404
Source Link
Ondrej
  • 502
  • 1
  • 3
  • 12
Loading
Post Made Community Wiki by animuson♦
deleted 4 characters in body
Source Link
Willi Mentzel
  • 29.4k
  • 21
  • 117
  • 125
Loading
Notice removed Content dispute by CommunityBot
Post Unlocked by CommunityBot
Post Locked by Taryn
Notice added Content dispute by Taryn
Rollback to Revision 2
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 12
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 11
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 10
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 9
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 8
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 7
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 6
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 5
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 4
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 3
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Rollback to Revision 1
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading
Copy edited.
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 109
  • 132
Loading
Source Link
Apurv Nerlekar
  • 2.3k
  • 1
  • 21
  • 29
Loading