Add User and Password to databases

Hi,

I have created the 4096 databases to use with Multi-DB. How do I now add the user and password to all of these without having to do it manually one at a time?

Thanks,

J-P

  • jphogbin
    • Site Builder, Child of Zeus

    Hi,

    I am accessing the databases via phpMyAdmin through the individual domain's cPanel. I have the site hosted on a Linux VPS.

    i have full root access but i am not sure of the way to do this. So far I have tried the following and the errors are as follows.

    Thanks,

    J-P

    GRANT ALL PRIVILEGES ON 'xxxxx_blogdbxxx\_%`.* TO 'user'@'localhost'

    #1064 - 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 ''xxxxx_blogdbxxx\_%`.* TO 'user'@'localhost'' at line 1

    GRANT ALL PRIVILEGES ON 'xxxxx_blogdbxxx\_%`.* TO 'xxxxx_xxxxx'@'localhost'

    #1064 - 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 ''xxxxx_blogdbxxx\_%`.* TO 'xxxxx_xxxxx'@'localhost'' at line 1

    GRANT ALL PRIVILEGES ON xxxxx_blogdbxxx\_%.* TO xxxxx_xxxxx@localhost

    #1044 - Access denied for user 'okspec'@'localhost' to database 'xxxxx_blogdbxxx\_%'

    GRANT ALL PRIVILEGES ON xxxxx_blogdbxxx\_%.* TO xxxxx_xxxxx@localhost IDENTIFIED BY password

    #1064 - 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 'password' at line 1

  • drmike
    • DEV MAN’s Mascot

    Never really got answered because it;s really a host question and depends on your level of access to the server. You need to have root access to do this. Else you;re pretty much stuck with doing one at a time through CPanel.

    One of the reasons why we tell folks not to do this on shared hosting.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.