[Solved] MySQL DB Issues - Cannot use Root.

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[Solved] MySQL DB Issues - Cannot use Root.

Postby linuxdad » Mar 12th, '15, 02:40

I am trying to update the user table with permisions for a new server. This worked on a previous MySQL DB server (perhaps a version 4?).

Anyway, when I use the mysql_setpermission utility (phpmyadmin is not available right this second, so I am reverting to the Old School method).

This is basically how this goes for now.

Code: Select all
mysql_setpermission -u root -p
Option p is ambiguous (password, port)
Password for user root to connect to MySQL:

######################################################################
## Welcome to the permission setter 1.4 for MySQL.
## made by Luuk de Boer
######################################################################
What would you like to do:
  1. Set password for an existing user.
  2. Create a database + user privilege for that database
     and host combination (user can only do SELECT)
  3. Create/append user privilege for an existing database
     and host combination (user can only do SELECT)
  4. Create/append broader user privileges for an existing
     database and host combination
     (user can do SELECT,INSERT,UPDATE,DELETE)
  5. Create/append quite extended user privileges for an
     existing database and host combination (user can do
     SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,
     LOCK TABLES,CREATE TEMPORARY TABLES)
  6. Create/append full privileges for an existing database
     and host combination (user has FULL privilege)
  7. Remove all privileges for for an existing database and
     host combination.
     (user will have all permission fields set to N)
  0. exit this program

Make your choice [1,2,3,4,5,6,7,0]:
<snip>
Okay we keep it with this ...
The following host(s) will be used: 192.168.50.3.
######################################################################

That was it ... here is an overview of what you gave to me:
The database name       : *
The username            : RelayDelay2
The host(s)             : 192.168.50.3
######################################################################

Are you pretty sure you would like to implement this [yes/no]: yes
Okay ... let's go then ...

Access denied for user 'root'@'localhost' (using password: YES) at /usr/bin/mysql_setpermission line 276, <STDIN> line 10.



Code: Select all
Line #276 is the Following:

# all privileges
       $sth = $dbh->do("GRANT ALL ON $db.* TO \'$user\'\@\'$host\' IDENTIFIED BY \'$pass\'") || die $dbh->errstr;



SO the problem is that I cannot add another user to the DB, what do I need to do? Should (can) I run the /usr/bin/mysql_upgrade Utility?
Last edited by linuxdad on Mar 12th, '15, 03:05, edited 1 time in total.
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: MySQL DB Issues - Cannot use Root.

Postby linuxdad » Mar 12th, '15, 03:04

OK, because I found NOTHING on the web regarding my issue, I thought that for completeness I would respond with the answer to this issue.

While I did import the DB data from the older server I did not perform a mysql_upgrade, check the options because this tool resolved the issues I was having.

Thank you.
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest