About creating database

I’m trying to set up the initial playground for the MU install, as a newbie I need to confirm some details, please correct me if I’m wrong.

1, It seems that the first step is to creat 16 or 256 databases and grand the privileges to a database user, I use the tool on

http://db-tools.wpmudev.org/db_sql.php

And run the generated script as root, add 16 databases to the database, they can be seen if I login to phpmyadmin as root;

2, To modify the db-config.php file I use the tool on:

http://db-tools.wpmudev.org/db_servers.php

and change the file accordingly, like:

add_db_server(‘a’, ‘dc1′, 1, 1,’174.*.*.*’,’localhost’, ‘mu_a’, ‘wpmu’, ‘mypassword’:wink:;

I’ve done this step.

3, I assume the database user “wpmu” needs the access right to read and write those 16 or 256 databases, but I’ve no idea how to write this mysql script. And I don’t know where to run the script. Please show me a demo, if I’m wrong in the previous 2 steps please tell me the details, thank you.

p.s. What’s this page for?

http://db-tools.wpmudev.org/db_array.php

Should I put the “array” to somewhere?

  • Andrew
    • Champion of Loops

    Hiya,

    1, It seems that the first step is to creat 16 or 256 databases and grand the privileges to a database user, I use the tool on

    http://db-tools.wpmudev.org/db_sql.php

    And run the generated script as root, add 16 databases to the database, they can be seen if I login to phpmyadmin as root;

    That tool will generate the SQL to create the databases. After they’re created you just create a user and grant privileges for the databases.

    2, To modify the db-config.php file I use the tool on:

    http://db-tools.wpmudev.org/db_servers.php

    and change the file accordingly, like:

    add_db_server(‘a’, ‘dc1′, 1, 1,’174.*.*.*’,’localhost’, ‘mu_a’, ‘wpmu’, ‘mypassword’:wink:;

    If your databases are located on your web server then you can just use localhost instead of the IP.

    3, I assume the database user “wpmu” needs the access right to read and write those 16 or 256 databases, but I’ve no idea how to write this mysql script. And I don’t know where to run the script. Please show me a demo

    We don’t have a script for this. You have to grant privileges manually. PHPMyAdmin will work for this if you login with the root account.

    p.s. What’s this page for?

    http://db-tools.wpmudev.org/db_array.php

    Just ignore that one.

    Thanks,

    Andrew

  • each1
    • New Recruit

    Thank you for your reply, Andrew.

    You said the privileges has to be set up manually, if someone needs to set up 4096 data servers for a new install in the future, is there any shortcut for us to do this other than manual set up? Because even a manual install for 256 servers takes a long time. Thanks.