Portal Home > Knowledgebase > Articles Database > debian mysql issue


debian mysql issue




Posted by santosh007, 11-24-2010, 03:34 PM
When installing mysql-server root account is not being created. I have checked all installs of Debian 4 and 5 I can create the root login manually but it should not be this way. Whenever I install an application via apt-get install or aptitude install it does not install the mysql user. I receive no errors. Is this an issue with all the debian builds?

Posted by LVPSHosting, 11-24-2010, 04:32 PM
No, as I'm aware of it is not. Can you please tell which command exactly you use to install mysql?

Posted by kevinnivek, 11-24-2010, 04:45 PM
you could try dpkg-reconfigure mysql-server or whatever the command is to initiate the configuration 'wizard'. Usually a wizard should come up to set the root password. You can manually reset it if you manually start mysql with --skip-grants (i think). That would allow password-less root access. ~k

Posted by santosh007, 11-24-2010, 06:52 PM
I am getting this error root@who ~]#mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) [root@who ~]#

Posted by seikan, 11-24-2010, 07:08 PM
I had the same problem before! It bugged me 2 days and even the VPS provider supports has no idea how to solve it. After searching around, I have found the solution. Let me share with you. 1. Check for debian-sys-maint password at /etc/mysql/debian.cnf 2. Run following command to fix privileges. 3. Now login using this debian created user: 4. Create your root user using following command: I hope these help. Mostly happen with Debian minimal.

Posted by Scientist, 11-24-2010, 08:56 PM
Some of the Xen Debian templates have wrong /tmp permissions, causing the root mysql account to fail. Try checking to see if your /tmp is correctly chmodded to 1777 and try reconfiguring/reinstalling mysql again. Seikan's method will work as well if I recall correctly, its been a while since I setup my Debian box.

Posted by MarlX, 11-24-2010, 09:33 PM
Thanks! Have this kind of problem too. Will try this solution.

Posted by santosh007, 11-25-2010, 05:01 PM
I am still getting this error [root@who ~]#mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y ES) [root@who ~]# Please help me I have reload my VPS also.

Posted by seikan, 11-25-2010, 06:54 PM
Can you login using debian-sys-maint user and display the previleges?

Posted by santosh007, 11-25-2010, 07:05 PM
Yes I am able to login using debian-sys-maint user and display the previleges successfully

Posted by santosh007, 11-25-2010, 07:07 PM
Please help me

Posted by seikan, 11-25-2010, 09:35 PM
Try: then: and paste your output here.

Posted by technichristian, 11-26-2010, 01:47 AM
chmod 1777 /tmp Then remove and reinstall mysql. This should fix it.

Posted by xenbox, 11-26-2010, 03:17 AM
try read this to give root grant manually. i have this problem too yesterday http://xenbox.net/what-new/restore-r...ot-previleges/



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language: