Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Why is a backslash added to Db field of db table of the mysql database of MySQL?

Discussion in 'General Discussion' started by PondRicefied, Sep 13, 2005.

  1. PondRicefied

    PondRicefied Well-Known Member

    Joined:
    Dec 13, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Hi, all.

    I have encountered the strange problem in MySQL.
    In the "MySQL-Databases" screen of Cpanel, even if it changes "Grant permissions on a MySQL database to a MySQL user", I have become with "Privileges: ALL PRIVILEGES".

    So, it shows that Privileges is not changed.

    When the log of MySQL is recorded, it looks like a cause that a backslash is added to the underbar (_) of a database name (Db), and the query is run.

    How should I Fix this problem? :confused:

    The following is record of the query at the time of changing "Grant permissions on a MySQL database to a MySQL user".

    [MySQL Log]========================================================
    5 Connect root_user@localhost on mysql
    5 Query SET AUTOCOMMIT=1
    5 Query FLUSH PRIVILEGES
    5 Query show databases
    5 Query select Host from user where User REGEXP "^username\_"
    5 Query select Host from user where User='username'
    5 Query replace into user (host,user,password) values('localhost','username',password('password'))
    5 Query GRANT ALL ON `dbusername\_dbname`.* TO 'username'@localhost
    5 Query FLUSH PRIVILEGES
    5 Quit
    6 Connect root_user@localhost on mysql
    6 Query SET AUTOCOMMIT=1
    6 Query select Host from user where User REGEXP "^username\_"
    6 Query select Host from user where User='username'
    6 Query FLUSH PRIVILEGES
    6 Query GRANT CREATE,DELETE,SELECT,INSERT,UPDATE ON `username\_dbname`.* TO 'username_dbusername'@'localhost'
    6 Query FLUSH PRIVILEGES
    6 Query show databases
    6 Query select Host from user where User REGEXP "^username\_"
    6 Query select Host from user where User='username'
    6 Query replace into user (host,user,password) values('localhost','username',password('password'))
    6 Query GRANT ALL ON `username\_dbname`.* TO 'username'@localhost
    6 Query FLUSH PRIVILEGES
    6 Quit

    ========================================================

    [select * from db;]========================================================

    +-----------+----------------+----------------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+
    | Host | Db | User | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Create_tmp_table_priv | Lock_tables_priv |
    +-----------+----------------+----------------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+
    | localhost | username_dbname | username | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | Y | Y | <--- 1
    | localhost | username\_dbname | username | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | Y | Y | <--- 2
    | localhost | username_dbname | username_dbusername | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | Y | Y | <--- 3
    | localhost | username\_dbname | username_dbusername | Y | Y | Y | Y | N | N | N | N | N | N | N | N | <--- 4
    ========================================================
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 PondRicefied, Sep 13, 2005
    Last edited: Sep 15, 2005
  2. PondRicefied

    PondRicefied Well-Known Member

    Joined:
    Dec 13, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    Everyone?

    Can everyone do change of Priviledge in a control panel?
    Can't only I do it?

    Please give me advice if you please.
    Please please please help.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 PondRicefied, Sep 14, 2005
    Last edited: Sep 14, 2005
  3. PondRicefied

    PondRicefied Well-Known Member

    Joined:
    Dec 13, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    156
    The issue of Cpanel? or MySQL? or php?

    If direct GRANT is run by the shell on SSH, I have no problem, but when it changes from Cpanel, I happen.

    Pleeeeeeeeeeeeeeeeese heeeeeeeeeeeeeeeeeeeeeeelp.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice