Results 1 to 6 of 6
Hi folks,
CentOS 4.4 amd64
I have been stuck on creating root password;
# mysqladmin -u root password yourrootsqlpassword
Code:
Access denied for user ‘root’@'localhost’ (using password: NO)
# su ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-28-2007 #1Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
mysql - problem on creating root password
Hi folks,
CentOS 4.4 amd64
I have been stuck on creating root password;
# mysqladmin -u root password yourrootsqlpassword# su -Code:Access denied for user ‘root’@'localhost’ (using password: NO)
did not help.
Pls advise how to locate mysql’s hostname.pid file?
Then to run;
# kill `cat /mysql-data-directory/host_name.pid`
mysqld_safe –skip-grant-tables &
mysqladmin -u root flush-privileges password “newpassword”
OR is there any other way to fix this problem. TIA
B.R.
satimis
- 03-28-2007 #2
I don't know much about MySQL, but when I do work with it (which is a lot lately), I use Webmin to do everything. It's not as fast as the command line, but it's simple and gets the job done.
http://webmin.com/
I'm sure someone else can help you out, though. I'm simply recommending this product.
Best of luck
I praise Webmin and PuTTy!
Registered Linux User: 439431
- 03-28-2007 #3Just Joined!
- Join Date
- Aug 2006
- Location
- DC
- Posts
- 13
Did you search for mysqld.pid or your hostname.pid? Mine is located under /var/run/mysqld/mysqld.pid.
Originally Posted by satimis
- 03-29-2007 #4Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
Hi zildjian1979,
Originally Posted by zildjian1979
I found it, same as yours.
Previously I made a mistake leaving out "--" before password.
Tried again;
[root@server ~]# mysqladmin -u root --password mypasswordTyping either "mypassword" or "YES" prompted;Code:Enter password:
Still failedCode:mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'
satimis
# mysqladmin -u root password yourrootsqlpassword
- 03-29-2007 #5Just Joined!
- Join Date
- Mar 2007
- Posts
- 42
Let's check it .
First, Is the MySQL data dir is own by mysql group mysql( ex : /usr/local/mysql/data )
Then, kill all the mysql process... And start it again with option --user=mysql...Code:# ls -ltr /usr/local/mysql/data
Then change mysql root passwordCode:mysqld_safe --user=mysql &
Code:mysqladmin -u root password 'new_password'
- 03-29-2007 #6Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
# find / -name data
Originally Posted by jin_1644 # find / -name mysql -type dCode:/var/named/data /var/named/chroot/var/named/data /usr/share/icons/gnome/16x16/stock/data /usr/share/icons/hicolor/24x24/stock/data /usr/share/icons/hicolor/48x48/stock/data /usr/share/icons/hicolor/32x32/stock/data /usr/share/icons/hicolor/16x16/stock/data /usr/share/cups/data /usr/share/pear/data /usr/lib64/python2.3/site-packages/Ft/Share/Demos/BuyerBase/data /usr/lib64/python2.3/email/test/data
No mysql directory on /user/localCode:/var/lib/mysql /var/lib/mysql/mysql /usr/lib/mysql /usr/include/mysql /usr/share/mysql /usr/lib64/mysql /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/DBD/mysql /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/auto/DBD/mysql
B.R.
satimis


Reply With Quote
