LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-19-2006, 08:47 AM   #1
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Rep: Reputation: 32
MYSQL:Access denied!!!!


Hi all now am trying to install cacti and i followed the instructions quite easily. Now when i try to access the web interface i get the following error which is in relation to importing the defauldt cacti database to the mysql:
Code:
Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:

mysql -u cactiuser -p cacti < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.
So i run the above command and i still get the same error. Now that's not all. When i try to access mysql i get the following:
Quote:
mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
I have a cacti user who can login to mysql but cannot update the grant tables which is part of the cacti installation.
While you guys are still at it could you give me the best way to uninstall mysql?
cheers
 
Old 12-19-2006, 09:16 AM   #2
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: xubuntu
Posts: 186

Rep: Reputation: 21
Your command is incomplete.

Try
Code:
mysql -u root -p
 
Old 12-19-2006, 09:35 AM   #3
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Original Poster
Rep: Reputation: 32
ok even with that it still asks for a password yet when i give it the password:
Code:
mysql>  GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'me'; ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'cacti'
Is this to mean that the root user cannot perform tasks such as provide grants to the users in the databases?
 
Old 12-19-2006, 09:43 AM   #4
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,043

Rep: Reputation: 83
have you ran the mysql_install_db and ran the mysqladmin -u root password 'password_here'
 
Old 12-19-2006, 10:01 AM   #5
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: xubuntu
Posts: 186

Rep: Reputation: 21
What jstephens84 means is that you may not have run the commands to initially set up the mysql root passwords. You should run both of these, if you haven't already:
Code:
mysqladmin -u root -h 'hostname' password 'password'
mysqladmin -u root password 'password'
They can both be the same password. Note this is just a password for mysql admin, not your Linux root password (could be the same, but probably not a good idea).
 
Old 12-19-2006, 10:51 AM   #6
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,043

Rep: Reputation: 83
the mysql_install_db also installs the system database and setups up the permissions. So at this point in time root may not have the appropriate permissions.
 
Old 12-19-2006, 10:09 PM   #7
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Original Poster
Rep: Reputation: 32
Quote:
What jstephens84 means is that you may not have run the commands to initially set up the mysql root passwords. You should run both of these, if you haven't already:
Code:

mysqladmin -u root -h 'hostname' password 'password' mysqladmin -u root password 'password'
Now here is the output of the first command you gave me:
Quote:
mysqladmin: unable to change password; error: 'Access denied for user ''@'jkuatdb' to database 'mysql''
Where jkuatdb is the name of my host though even if i change it to localhost i get the same error.
...And for the second one:
Quote:
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
At this point there's really nothing much i can do with my database.

Last edited by immortaltechnique; 12-19-2006 at 10:10 PM.
 
Old 12-21-2006, 04:54 PM   #8
jstephens84
Senior Member
 
Registered: Sep 2004
Distribution: (Home)Opensolaris, Ubuntu, CentOS, (Work - AIX, HP-UX, Red Hat)
Posts: 2,043

Rep: Reputation: 83
what do you get when you run
Code:
mysqladmin -u root password '<your password>'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL access denied newlinuxnewbie Linux - General 3 10-25-2005 04:42 AM
MySQL: 'access denied for user' turbo_acura Linux - General 1 10-20-2004 08:34 AM
MYSQL access denied for user c0c0deuz Linux - General 1 03-18-2003 02:44 PM
MySQL - access denied X11 Linux - Software 1 08-19-2002 05:51 AM
MySQL access denied problems ?? huno Linux - General 1 05-16-2002 10:30 AM


All times are GMT -5. The time now is 06:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration