• 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

    • Copilot in Excel just got a major upgrade by Usama Jawad It's no secret that Microsoft is trying to get as many people to use Copilot as possible. This is being done through various means, including integration with OneNote, Defender, Windows, and more. Microsoft Excel is the most popular spreadsheet software out there, so it makes sense that the Redmond tech firm would integrate and build upon the capabilities of Copilot in this tool too. Now, the company has implemented a major upgrade in this integration. In a blog post, Microsoft has made Copilot smarter in terms of context awareness in Excel. This makes the AI assistant more useful when asking questions about your data in nautral language queries. Previously, Copilot would only make inferences based on the cell that you have selected, and it typically worked quite well in this scenario. However, Microsoft has realized that workbooks and sheets have become more complex, which means that Copilot needs to be smarter too. This means that you no longer need to select relevant data when asking queries about it, you can simply ask questions such as "Show me insights about the data I was just analyzing" and "Sort the table in the top-right", and Copilot should just work. Microsoft says that this major upgrade in Copilot is due to combining cell signals with chat history in order to make inferences. It also supports data ranges, which means that it can serve as the foundation for even broader context in future updates. In order to get customers to trust the inferences that Copilot is making, Microsoft will highlight the data that the AI assistant is using. This enables customers to further refine the dataset that Copilot is using so that they can get the most accurate responses. Smart context awareness is available on the web and the following versions of desktop: Windows: Version 2505 (Build 18623.20058) Mac: Version 16.95 (Build 2506.3090) Meanwhile, the visual highlighting feature is also available on the web and the desktop versions mentioned below: Windows: Version 2505 (Build 18705.20000) Mac: Version 16.96 (Build 2506.4070) Microsoft has requested customers to provide feedback through the thumbs up/down icons present at the bottom of the Copilot response cards.
    • We should probably just focus on how nice it is that finally another company is taking reusable rockets seriously. I can't believe there are so few players and many rockets in service today are still completely expendable. Hopefully Honda can scale up theirs and add some badly needed competition. I want to see planes become irrelevant for global travel and we use rockets instead.
    • Yea. It's obviously being deprecated, in case no one noticed or forgot all the announcements and changes. Not such a big deal.
    • The best thing would be to just allow more options to let users pick the layout they like, it doesn't matter at this point really and it's not that hard to do as evidenced but all the 3rd party menus/tools that let you change it in lots of different ways. If you give the users more options they'll be happy, take them away and you have a problem.
  • Recent Achievements

    • Week One Done
      slackerzz earned a badge
      Week One Done
    • Week One Done
      vivetool earned a badge
      Week One Done
    • Reacting Well
      pnajbar earned a badge
      Reacting Well
    • Week One Done
      TBithoney earned a badge
      Week One Done
    • First Post
      xuxlix earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      686
    2. 2
      ATLien_0
      285
    3. 3
      Michael Scrip
      225
    4. 4
      +FloatingFatMan
      197
    5. 5
      Steven P.
      135
  • Tell a friend

    Love Neowin? Tell a friend!