• 0

[PHP and MySQL] Flush Privileges


Question

Hi All,

I am new to PHP, but I think I have learnt quite a lot so far. :D I have a question regarding the MySQL query, flush privileges. Do I need to include it?

I have set up a PHP page that adds information to a MySQL database using the INSERT statement. The database contains user data.

If possible, could someone also tell me when it should be used?

Thanks,

Smctainsh

Link to comment
https://www.neowin.net/forum/topic/498793-php-and-mysql-flush-privileges/
Share on other sites

2 answers to this question

Recommended Posts

  • 0

From MySQL manual:

  Quote

http://dev.mysql.com/doc/refman/5.0/en/adding-users.html:

...

The reason for using FLUSH PRIVILEGES when you create accounts with INSERT is to tell the server to re-read the grant tables. Otherwise, the changes go unnoticed until you restart the server.

With GRANT, FLUSH PRIVILEGES is unnecessary.

...

As usual when you modify the grant tables directly, you must tell the server to reload them with FLUSH PRIVILEGES so that the privilege changes take effect.

...

  • 0
  Wilhelmus said:

From MySQL manual:

The problem is though, when I try to tell it to flush privileges, it 'dies', and I get an error that I specified in the PHP code.

When I go to phpMyAdmin, I can view the new entries. When I go to sign in using the credentials I added to the database using the login script, I am able to login. Do I need to use flush privileges?

Smctainsh

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Does the 4TB Crucial X10 still have the Data corruption issues that plague the previous generations?
    • Is the Start menu needed? Yes. Is it needed in its current form? No. I run lubuntu, it has all my apps sorted into categories, a bunch of preferences and system tools, the option to turn off, and search. It's all in a small rectangle and does everything you need it to.
    • Star Citizen Alpha 4.2 update lands with radiation hazards, dynamic rain, and more by Pulasthi Ariyasinghe The crowd-funded sci-fi RPG Star Citizen has received another update to its public alpha build. This time, developer Cloud Imperium Games has delivered new features like radiation as a brand-new hazard, irradiated creatures, the first implementation of a dynamic weather system for planets, and more. Dubbed Storm Breaker, Alpha update 4.2's cinematic trailer can be caught above, showing off the new sandbox activity. Storm Breaker is the name of the new sandbox activity too, continuing the ongoing Regen Crisis narrative. Players will be going to Pyro 1 and 4 while uncovering the experimentation secrets of the Associated Sciences & Development company while also weathering a never-ending storm, irradiated zones, and dangerous creatures to complete the event's tasks for hard-earned loot. Speaking of radiation, players will need to wear specialized gear and navigate carefully whenever they come across these special hazardous zones on planets. "This update adds new Radiation accumulation, resistance, and falloff thresholds to player status effects," says the developer. "These effects will appear as new visual and player status cues with REMs on the HUD and can cause consequences resulting in player injury or death if not treated." Locations on Stanton and Pyro planets can now have rain happen on them at various locations and times. Cloud Imperium calls this the first implementation of its Genesis: Dynamic Weather system. When ready, the full version of this tech will be rolling out to many more planets and will supposedly have rain and cloud formations, lightning, relevant audio, water pooling, and clothing shaders for wetness. Other changes of the update include better missile and torpedo tracking, new explorable locations, irradiated juvenile sandworms to fight, fixes for space stations and landing zones to reduce clipping and glitches, and much more. The complete release notes for the update can be found here. Star Citizen Alpha 4.2: Storm Breaker is now available for all backers in the Live channel.
  • Recent Achievements

    • Week One Done
      Wayne Robinson earned a badge
      Week One Done
    • One Month Later
      Karan Khanna earned a badge
      One Month Later
    • Week One Done
      Karan Khanna earned a badge
      Week One Done
    • First Post
      MikeK13 earned a badge
      First Post
    • Week One Done
      OHI Accounting earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      680
    2. 2
      ATLien_0
      269
    3. 3
      Michael Scrip
      209
    4. 4
      +FloatingFatMan
      170
    5. 5
      Steven P.
      148
  • Tell a friend

    Love Neowin? Tell a friend!