Don't edit the index.php file at all. After you've installed the sql/ful_install.sql file to your realmd database make sure to edit your config/config-protected.php file

<?php

$realmd = array(
'db_type' => 'mysql',
'db_host' => '127.0.0.1', //ip of db realm
'db_port' => '3306', //port
'db_username' => 'root', //realm user
'db_password' => 'mangos', //realm password
'db_name' => 'realmd', //realm db name
'db_encoding' => 'utf8', // don't change
);
?>



Install the file sql/extra_install/account_pass.sql

Select the account_extend table and look-up your account in the "account_id" column.

Your account ID is cross-referenced from the corresponding account table. Looking for it in the account table first may be easier since you can see the user names associated with the account ID.

Locate the g_id column for your account_id in the account_extend table. Modify this to a 3 or a 4 to give yourself admin(3) or root admin(4) access.

Go into your realmlist table and locate the dbinfo column. Modify it to your information:

root;mangos;3306;127.0.0.1;mangos;characters

That should fix your problems.