[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] MySQL



How to add users in MySQL?

When I do 
#mysqladmin -u root password xyz123 is denies access to root@localhost

What to do?

__________________________________________________________________
Dr. Sudhir Kumar (Linux User # 154279)
Asstt. Professor (Chemistry)
&
Incharge, Computer Centre
CCS Haryana Agricultural University, Hisar - 125 004

On Wed, 15 Dec 1999, Uday Kumar Khatua wrote:

> do the following:
> loginto mysql as root.
> i assume that you have set a root passwrod onto mysql.
> $mysql -u root -p password.
> mysql> use mysql
> 
> this will select the database mysql.
> Now
> mysql> show tables;
> will show you the tables.
> table user contains n data on the user, with hisher login accesses.
> 
> mysql> desc user;
> +-----------------+---------------+------+-----+---------+-------+
> | Field           | Type          | Null | Key | Default | Extra |
> +-----------------+---------------+------+-----+---------+-------+
> | Host            | char(60)      |      | PRI |         |       |
> | User            | char(16)      |      | PRI |         |       |
> | Password        | char(16)      |      |     |         |       |
> | Select_priv     | enum('N','Y') |      |     | N       |       |
> | Insert_priv     | enum('N','Y') |      |     | N       |       |
> | Update_priv     | enum('N','Y') |      |     | N       |       |
> | Delete_priv     | enum('N','Y') |      |     | N       |       |
> | Create_priv     | enum('N','Y') |      |     | N       |       |
> | Drop_priv       | enum('N','Y') |      |     | N       |       |
> | Reload_priv     | enum('N','Y') |      |     | N       |       |
> | Shutdown_priv   | enum('N','Y') |      |     | N       |       |
> | Process_priv    | enum('N','Y') |      |     | N       |       |
> | File_priv       | enum('N','Y') |      |     | N       |       |
> | Grant_priv      | enum('N','Y') |      |     | N       |       |
> | References_priv | enum('N','Y') |      |     | N       |       |
> | Index_priv      | enum('N','Y') |      |     | N       |       |
> | Alter_priv      | enum('N','Y') |      |     | N       |       |
> +-----------------+---------------+------+-----+---------+-------+
> 17 rows in set (0.00 sec)
> 
> also explore the other tables.
> typically what you have to do is to give allow rights to the IP of the
> machine running the client.
> 
> What kind of a security error do you recv anyway.
> 
> Alternately telnet from your win box to the Linux box and run mysql client
> from your telnet session. This should work.
> 
> more specifc message would help though.
> a message like
> ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
> means that you have missed out the -p in $mysql -u root -p.
> I dont know the analogy on a win mysql client, never used one.
> 
> 
> Hope this helps
> Regards
> Uk
> Anilkumar wrote:
> 
> > Thanks for your quick reply but can u tell me how to
> > do that.
> >
> > Anil
> >
> 
> --------------------------------------------------------------------
> The Linux India Mailing List Archives are now available.  Please search
> the archive at http://lists.linux-india.org/ before posting your question
> to avoid repetition and save bandwidth.
> 

--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.