1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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 Member

    Joined:
    Dec 13, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    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
    ========================================================
     
    #1 PondRicefied, Sep 13, 2005
    Last edited: Sep 15, 2005
  2. PondRicefied

    PondRicefied Member

    Joined:
    Dec 13, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
    #2 PondRicefied, Sep 14, 2005
    Last edited: Sep 14, 2005
  3. PondRicefied

    PondRicefied Member

    Joined:
    Dec 13, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    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.
     

Share This Page