LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Mysql issue with fc6 (https://www.linuxquestions.org/questions/linux-server-73/mysql-issue-with-fc6-542107/)

Net_Spy 03-31-2007 04:04 AM

Mysql issue with fc6
 
Greetings to all...

I just install the FC6 on my machine and also install httpd ,php,mysql,proftpd.now with mysql im trying to setting up the pass and user for my mysqladmin -u root password "new-password" im getting this error message

Quote:

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'


infact i just try to login using mysql for resetting my password for

update mysql.user set password=password("NEW-PASSWORD") where user="root";
flush privileges;
quit

root but getting this anoying error

update mysql.user set password=password("*******") where user="root";ERROR 1142 (42000): UPDATE command denied to user ''@'localhost' for table 'user'
I installed these packages
ive installed these packages.

libdbi-dbd-mysql-0.8.1a-12.2
mysql-connector-odbc-3.51.12-2.2
mysql-5.0.27-1.fc6
mysql-server-5.0.27-1.fc6
php-mysql-5.1.6-3

Im looking forward for your kind resonse.

Regards
Net_Spy

jschiwal 03-31-2007 05:29 AM

First of all, is the mysql service running?

According to the manual, initially, the root and anonymouse accounts have no password.
Code:

To use SET PASSWORD on Unix, do this:
shell> mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');
...
For Unix, do this:
shell> mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');

Be sure to read section 2.9.3 of the mysql manual at /usr/share/doc/packages/mysql/manual.pdf
2.9.3. Securing the Initial MySQL Accounts

Something else to check is that the SELinux configuration isn't denying access to the tables or other files. Check your logs to make sure.

Net_Spy 04-01-2007 08:27 AM

Guys ive tried all the possible way try to reseting root but one thing i want to clear it out does mysql read the file /etc/my.cnf for user if it doest then there is no user added in my.cnf file. here is the file
there is only a single user mysql and it doesnt have the rights to create database and its without pass.Im looking forward for your kind response.
Code:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Code:

getting this error when using mysql -u root

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


jschiwal 04-01-2007 05:30 PM

I wonder if the root account was disabled, or the password was changed. The mysql user is a system user that the mysql server runs as instead of as root.

Try
Code:

mysql -u root -p
<password>

This works for me whereas "mysql -u root" gives the same error message as you had.


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