MySQL on Lenny and permissions

Ok, had something strange that I think is worth a share. I just upgraded a virtual machine to Lenny and installed MySQL and phpMyAdmin and apache and the like. Created a user for a Django project I’m working on and it couldn’t connect. I tried resetting the password several times, didn’t help. Then, out of frustration, I tried connecting without a password and… it worked!

Apparantly, by default, the MySQL in Lenny created access rules that allow all local users to access the database without a password. These have priority over the specific user controls. A bit unexpected and I suspect others to run into this. Could make you search for a problem if you’re installing a shared webhosting machine with a local MySQL database.

Solution:
delete from mysql.user where User='';

Tags: , , , , , ,

 
 
  • Search


  • Twitter

    • En dat terwijl ik de laatste maanden juist bovengemiddeld vaak thuisgewerkt hebt, met name als het koud was... 14 hrs ago
    • Wat een verschil, van 125 p/m vorig jaar naar 68 p/m nu. 14 hrs ago
    • Hm, ondanks de koude maanden is mijn voorschot aan Essent nog steeds te hoog. Vrouwtje van klantenservice vond me "zeer spaarzaam". 14 hrs ago
    • @ipot @RuudHeijnen @iivvoo Wat *doen* jullie allemaal op je werk.... in reply to ipot 1 day ago
    • mijn huis staat op streetview... 1 day ago
    • More updates...

    Powered by Twitter Tools

  • Calender

    March 2010
    M T W T F S S
    « Feb    
    1234567
    891011121314
    15161718192021
    22232425262728
    293031  
  • Archives