visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: mysql configuration


By: digitaltree U.S.A.  Date: 16/05/2003 00:00:00  English French  Points: 125 Status: Answered
Quality : Excellent
I Have install mysql server & client on suse 8.1 using rpm.
After insatllation i run the following commands:
>mysql_install_db
>safe_mysqld --user=mysql &
After this I receive the message:
Starting mysqld deamon with databases from /var/lib/mysql
030516 18:53:35 mysqld ended

After this I tried
>safe_mysqld --user=root &
and the deamon start correctlly!

BUT when I execute the following command
>mysqladmin -u root password mypassword
I receive the error:

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

What I've done wrong?
If anyone could help me to configure my server..... :(




By: VGR Date: 16/05/2003 03:15:00 English  Type : Answer
1) check that datadir specified in my.cnf (or my.ini) is accessible rwx for unix user "mysqld"

2) sybtax is :
mysqladmin -u root -p thepassword

you'd better try
mysql --user=root --password=thepawword
use mysql;
select * from user;
// here check rights and passwors
// if ever you modify smth : flush privileges;
exit;
By: digitaltree Date: 16/05/2003 04:33:00 English  Type : Comment
Thank you very much for your help!
I did your first remark and the command
>safe_mysqld --user=mysql &
works now!

I also did the:
mysql --user=root --password=thepawword
use mysql;
select * from user;

can you explain me what and how to check or modify here?

how can I check if everything is OK?

Thanks in advance

By: VGR Date: 16/05/2003 17:42:00 English  Type : Comment
well, you should find a triplet (host,name,password) for each combination of access you configured.

Chances are you'll see only two lines("localhost","root","something_unreadable") and ("127.0.0.1", etc)

Now the Mysql documentation recommends that you create a user for you to work with from fron-end (eg PHP) scripts, with less privileges than the "root" one, so that you don't make grave mistakes and protect your DB from misuse of your scripts.

so to do this, you have two options :
either GRANT USAGE ON *@hostname TO 'username' IDENTIFIED BY 'password';
or INSERT INTO mysql.user VALUES ('hostname','username',PASSWORD('password'),'Y','Y','Y','Y','N','N','N','N','N','Y','N','N','N','N');

in any case, after successful input of the command chosen (I don't guarantee against typos :D ), issue :
FLUSH PRIVILEGES;

you're done
By: digitaltree Date: 19/05/2003 04:15:00 English  Type : Comment
Thanx VGR!
Viva la france :)
By: VGR Date: 19/05/2003 04:53:00 French  Type : Comment
oui, vive la France 8-)

Do register to be able to answer

EContact
browser fav
page generated in 303.014990 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page