I know this, but in fact, I’ve tried a lot of kind things to try have it working.
if I do mysql -u=root
it works, which means it reads the /root/.my.cnf password, right ?
As I’ve created a .my.cnf in /root/ and as I do these with user root, it should work only with
mysql or mysqldump or mysql -u root
but it doesn’t
My problem is I have a cron job that does a mysqldump and I’d like it use the /root/.my.cnf to find the root password. I assume it should work like this, ins’t it ?
If I do in a script
mysqldump -u root -p --all-databes > alldatabases.sql
it works but ask me for the rtoot password, if i launch in cron it stops
So how to give the password to this script, I thought the /root/.my.cnf was for this
I’ve been having a similar problem and am unable to resolve it.
I am trying to run a query to give a db user permission on a certain database. (GRANT command)
The Grant statement which I am issuing is in the following format:
GRANT ALL PRIVILEGES ON db_name TO ‘user’@‘ip’ IDENTIFIED BY ‘pass’
However, when I run the query in PHPMyAdmin, I continue to get the error:
MySQL said: Documentation #1044 - Access denied for user ‘domainna’@‘localhost’ to database ‘db_name’
The “domainna” above is actually the first 8 characters of my hostname (domain name). I don’t like that InterWorx pads all usernames with the name of the domain first… I feel that this is causing the issue.
Anyways I’ve been told that I need to perform this query as root while shelled into my server.
I’ve been told to shell in and then issue:
mysql -uroot -prootpass
However, I never set a MySQL root password. Is one set automatically? Is there a way for me to set one?
Is there any reason why you aren’t using SiteWorx to grant this user permissions? Regardless, ‘domainna’ is not a valid database user created by SiteWorx. All database users created from siteworx are of the form ‘domainna_username’. So, you’d want to use something like:
GRANT ALL PRIVILEGES ON db_name TO ‘testdoma_testuser’@‘ip’ IDENTIFIED BY ‘pass’
You can reset the MySQL root pass from NodeWorx by going to System Services -> MySQL Server -> Overview, and look for the MySQL Root Password box at the bottom of the screen.