monkeyboi
08-18-2002, 11:23 PM
how do i set a database username and password for mysql and a root password for all databases...??
thx
thx
|
Click to See Complete Forum and Search --> : mysql username and password monkeyboi 08-18-2002, 11:23 PM how do i set a database username and password for mysql and a root password for all databases...?? thx dfx 08-19-2002, 05:23 PM To set an initial root pass: mysqladmin -uroot password "newpasswd" To add user accounts, log into the mysql server as root and issue GRANT commands. Check the mysql docs for details. ArtyMcSwizzle 03-28-2005, 02:12 AM Banking off of this... root@Orbital:/home/magelus# mysqladmin -u root password "*********" mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: NO)' shed any light onto this? This is a fresh install of mysql 4.0.22 installed from a slackware package (however, I've gotten the same issue with a source installation). Nothing in the manual handles this situation. truls 03-28-2005, 06:51 AM I think the syntax is: #mysqladmin -u root -ppassword There is no space between -p and the password! ArtyMcSwizzle 03-28-2005, 06:01 PM Originally posted by truls I think the syntax is: #mysqladmin -u root -ppassword There is no space between -p and the password! do you mean, replace "password" with my password? As in, if my password was goatcheese i would type #mysqladmin -u root -pgoatcheese because there is no password to log into mysql (at least if there is, I have no clue what it is), it's a fresh install. I'm trying to set the root passwords for the first time, but its asking me for a password to change it... kind of a catch 22, eh? truls 03-29-2005, 01:36 AM The default password for mySQL is blank (i.e. no password). Try logging in using without the -p switch and then just press enter when it asks you for a password. ArtyMcSwizzle 03-29-2005, 12:41 PM Originally posted by truls The default password for mySQL is blank (i.e. no password). Try logging in using without the -p switch and then just press enter when it asks you for a password. magelus@Orbital:~$ mysqladmin -u root -p password 'goatcheese' Enter password: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: NO)' magelus@Orbital:~$ SpookyFox 03-29-2005, 05:36 PM Also, remember to take out the space between the -u and root. $ mysqladmin -uroot -pgoatcheese That should take you to the mysql screen providing you've set the password in the first place. Or, if you're trying to access the mysql database, you can also just do $ mysqladmin -uroot That should just allow you to enter the password at the prompt after pressing enter. Just remember that if you're writing a shellscript for the this type of command...you CANNOT have the spaces between the -u and root or the -p and password. That took me about 3 hours to realize. I know, I know...I'm not the brightest crayon in the box. ArtyMcSwizzle 03-30-2005, 02:36 AM Okay I've tried all of this. With removing spaces and all, still no luck. Its demanding a password. I can't just use the p trigger and hit return on request for password, because then it errors out with "access denied... using password: NO" ...wait scratch that it was set to my local root password ...wow I'm a real genious here Thanks for your help, I'm going to go hide sheepishly in the corner now. SpookyFox 03-30-2005, 03:14 PM Happens to the best of us man...I can't recall how many times I've done stupid stuff! ;) Good luck! justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |