Grant root user as super user in MySQL

Home Forums Other Open Source Grant root user as super user in MySQL

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    albertwt
    Member
    #151254

    Hi Everyone,

    How to make “root” user to have access to all databases with full privillege ?

    Because at the moment i always grant everything by using root but when i tried to connect to mysql db instance from TOAD for MySQL i got Access denied for user ‘root’@’mylaptop.domain.com’ (using password: YES) ?

    more like:

    SA in SQL Server
    SYS in Oracle

    [email protected]:/tmp$ mysql -u root -p

    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 248
    Server version: 5.1.41-3ubuntu12.6 (Ubuntu)

    Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

    mysql> grant all on database.* to [email protected];
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database.* to [email protected].com’ at line 1

    mysql> grant all on database.* to [email protected] identified by ‘root’;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database.* to [email protected] identified by ‘root” at line 1

    mysql> grant all on database.* to ‘root’ identified by ‘root’;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database.* to ‘root’ identified by ‘root” at line 1

    mysql> grant all on database.* to ‘[email protected]’ identified by ‘root’;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database.* to ‘[email protected]’ identified by ‘root” at line 1

    mysql>
    [/CODE]

    I tried to grant it but always failed.
    any kind of help would be greatly appreciated.

    Thanks.[CODE]
    [email protected]:/tmp$ mysql -u root -p

    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 248
    Server version: 5.1.41-3ubuntu12.6 (Ubuntu)

    Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

    mysql> grant all on database.* to [email protected];
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database.* to [email protected]’ at line 1

    mysql> grant all on database.* to [email protected] identified by ‘root’;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database.* to [email protected] identified by ‘root” at line 1

    mysql> grant all on database.* to ‘root’ identified by ‘root’;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database.* to ‘root’ identified by ‘root” at line 1

    mysql> grant all on database.* to ‘[email protected]’ identified by ‘root’;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘database.* to ‘[email protected]’ identified by ‘root” at line 1

    mysql>
    [/CODE]

    I tried to grant it but always failed.
    any kind of help would be greatly appreciated.

    Thanks.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.