Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
bash-2.05b# mysqladmin -u root -p password 'new-password'
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
Run as root... System is running Slackware 9.0, default install pretty much all the way with a few slight mods to things not pertaining to MySQL or PHP or Apache.
mysqld is indeed up and running, the process is up (when I run safe_mysqld I get "error, process already exists").
You can check the MySQL manual for additional info, but at first install, root doesn't have a password. You might try mysqladmin -u root and see where that gets you
Further notes on mysql:
From an initial Slack install the databases have to be created for the users, typing:
mysql_install_db
should create the tables but then the owner for these files needs to be changed to 'mysql' instead of root.
The files in question are in /var/lib/mysql and the owner and group both need to be set to mysql ie:
cd var/lib/mysql
chown -R mysql:mysql mysql
Mysql can then be started:
safe_mysqld &
Lemme know if this is ok
Oops missed a bit :
and mysqladmin used to change the root password:
mysqladmin -u root password 'new-password'
Other users can then be setup on mysql by logging in and then using:
grant all on * to fred identified by 'pass' with grant option;
This would grant all privileges on all db's to fred, see page 192 of PHP and MySQL.
mysqladmin should me mysql i think, but should work both ways , i swear i used mysql not mysqladmin. !!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.