setting up password on mysql

Networking/Security Forums -> Databases

Author: duster PostPosted: Tue May 26, 2009 10:11 am    Post subject: setting up password on mysql
    ----
im attempting to set the password for the first time in mysql and im recieving the following message .. "to few arguements to change password" my syntax is below.. any ideas?

mysqladmin -u root password 'my_password'

Author: hebaLocation: Cremona (Italy) PostPosted: Tue May 26, 2009 12:10 pm    Post subject:
    ----
usually when you install mysql for the first time ask you to set up the password, this is automatically, if you haven't this message or you have not set up the password when the system have ask you, this is not set up again like first password, but you can try to give the command with:

Stop the process

Code:
mysqld stop


Run again the process

Code:
mysql --skip-grant tables &


Enter like root in mysql

Code:
 mysql -u root mysql


Set up again the password

Code:
 UPDATE user SET password=PASSWORD("new pass") WHERE User="root";
FLUSH PRIVILEGES;
exit;


Restart mysql

Code:
mysql restart



try this, but it don't run, try also to reinstall completely mysql, if in any way you don't solve, write here again with every step you done and various error, please

Author: duster PostPosted: Tue May 26, 2009 3:44 pm    Post subject:
    ----
That work thanks alot. i tried to reinstall it but it keep the old password so i had the same problem but ive now been able to reset...

Author: hebaLocation: Cremona (Italy) PostPosted: Wed May 27, 2009 12:11 pm    Post subject:
    ----
no problem for the reply... Surprised

sometimes the old setting remain registered in the hard disk, have you try to purge mysql setting and to erase completly mysql before reinstall?

Author: duster PostPosted: Wed May 27, 2009 12:24 pm    Post subject:
    ----
dont know how to purge... im not an mysql admin

Author: hebaLocation: Cremona (Italy) PostPosted: Wed May 27, 2009 1:06 pm    Post subject:
    ----
are in windows, linux or macos, please?

Author: duster PostPosted: Wed May 27, 2009 2:56 pm    Post subject:
    ----
heba wrote:
are in windows, linux or macos, please?



linux

Author: hebaLocation: Cremona (Italy) PostPosted: Wed May 27, 2009 3:10 pm    Post subject:
    ----
in this case depend of your distro.

For Ubunut/Kubuntu/Debian and derivates:

Code:
 # apt-get purge mysql


if you have any other distribution you can go in manage packages

find mysql

and when you give the command to delete the file you see a pop up window and after select remove all packages with all configuration files.

and the system erase completely all packages.



Networking/Security Forums -> Databases


output generated using printer-friendly topic mod, All times are GMT + 2 Hours

Page 1 of 1

Powered by phpBB 2.0.x © 2001 phpBB Group