Solved

Fedora 10, mySQL 5.0.67 has a different login steps from FC-7, mySQL 5.0.37, and I got an error of access.

Posted on 2014-04-22
6
361 Views
Last Modified: 2014-04-26
Up to MySQL 5.0.37 (FC-7), there were username and password for login to get into the MySQL server.    However, when I am in Fedora 10, MySQL 5.0.67, I got different login steps,

$ mysql -u username -p
password :   xxxxxx           MySQL 5.0.37 (FC-7)


$ mysql -u username -p
ERROR:   Access denied for user ' '@'localhost' to database '   '.
                                                  Fedora 10, MySQL 5.0.67


I did exactly the same way of initial setting to both MySQL server (Fedora Core 7 and Fedora 10), which I learned from textbook "Learning SQL".   That procedure was as below,


$ mysql -u root
(Welcome messages)

mysql>  UPDATE  mysql.user
          ->   SET  password =  PASSWORD('root_password')
          ->   WHERE User =  'root';
(Query OK, message)

mysql>  FLUSH PRIVILEGES;
(Query OK)

mysql>  grant all privileges on *.* to 'mkido'@'localhost'  identified by 'xxxxx(mkido_password)';

(Query OK message)


=====================================================
After this initial root and username(mkido) setting, when I issue the following command line, I got an error like below, PLEASE help me, how to deal with !

[username@.. ~]$  mysql   -u  mkido
ERROR 1045 ..:    Access denied for user 'mkido'@'localhost' (using password: NO)

OR - OR - OR -

[username@.. ~]$  mysql   -u  mkido -p
ENTER password :   XXXXX     (I typed in my password.)
ERROR 1045 ..:    Access denied for user 'mkido'@'localhost' (using password: YES)

What do you think ?    Thanks.
0
Comment
Question by:mkido
  • 4
  • 2
6 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40018567
I think something else is going on because that login to 'mysql' hasn't changed since at least version 3.23 and remains the same in the current version.   http://dev.mysql.com/doc/refman/5.7/en/mysql.html  You can try the 'long' syntax:
mysql --user=user_name --password=your_password db_name

Open in new window

0
 

Author Comment

by:mkido
ID: 40018988
I agree.    Something else is going on.    It is absolutely weird.    

(shell) $ mysql -u root_password      OR
(shell) $ mysql  -u user_paassword

makes me get into MYSQL, and I see welcome message.     They must be root or username.    Apparently, user and password appear mixed up (or exchanged).     Very weird.    


 Well, let me continue later, because I may want to completely reload the Fedora 10 entire system.    There is no data or special setting on this computer (local, not on net).   So, I have no problem of complete cleaning up.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40019051
Ok.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:mkido
ID: 40021456
THIS TIME, NORMAL LOGIN IS WORKING :


I have completely reloaded the entire Fedora 10 Operating System.   Because the computer is a local one, and this procedure only took about one hour or so.    

After I started the band new Fedora 10 computer, I started mysqld as below,
   
# /etc/init.d/mysqld    start

then initialization of MySQL database and starting MySQL were [OK].   Then, I did

$ mysql -u root

mysql>  UPDATE  mysql.user
          ->   SET  password =  PASSWORD('root_password')
          ->   WHERE User =  'root';

mysql>  FLUSH PRIVILEGES;

mysql>  grant all privileges on *.* to 'mkido'@'localhost'  identified by 'xxxxx(mkido_password)';


AFTER THIS SETTING, EVERYTHING works normal.   ALL LOGINs work normal.  
Perhaps, somewhere in the MySQL setting, I messed up at the previous time.     During the previous setting I had to break up one time procedure into two times or more, due to displaying to my student, who is learning MySQL as a newbie.       Thank you so much, Dave.    Practically I fixed it by Operating System (Fedora 10) reloading.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40021575
I'm glad you got it working .
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40024188
Thanks for the points.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikipedia.org/wiki/PHP  Very powerful.  But a…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question