CANNOT CREATE DATABASE or ACCESS DENIED FOR USER (fresh install or moved installation)
If you are having problems installing a new PostNuke site and have tried entering your info in the install form in the format: Database Username = "sitename_Admin", Database Password = "God" (asterisks), Database Name = "sitename_NukeDB" (or whatever you named your database), and are sure that the user you've entered has full database privileges for that database, then the information below may be of some use.
Note that, when MOVING a working PostNuke installation to another server, in order to keep the original database it is necessary to EXPORT the database BEFORE leaving the old server, so that this database content can be imported to the new database on the new server. This can be done using cpanel's "MySQL Databases" function to access the "phpMyAdmin" function which is usually accessed via a text link at the bottom of the window. Select the "databases" function in phpMyAdmin and then select the specific database. Then go to the "export" tab. Select the database name and use the default settings to export the database as a .sql file with the structure intact.
To IMPORT the database into the new server environment, follow the above steps to access the "MySQL Databases" using cpanel's "MySQL Databases" function to create a new database. (Or, if you don't have cpanel, but have either shell access or phpMyAdmin, you can enter the following commands: "mysqladmin create your_db_name -p" and then: "mysql your_db_namephpMyAdmin" function, select "databases" and then the specific database you just created. Then use the text link on the left to open a "Query window". Here you will select the "IMPORT FILES" tab and browse for the file which you previously exported.
If you are dealing with an ACCESS DENIED FOR USER or CANNOT CREATE DATABASE ("No Database Created") problem when attempting a new installation, the steps are similar to the above, except that you will instead import the "Phoenx-0.7.2.6.sql" (numbers vary depending on your version) file which is part of the zipped distribution package. This is a "dump" of the default database content which the PostNuke installer is attempting to create. ALSO be sure to add the following user and password: "Admin" (user) "God" (password) to the database you created. This is necessary because the "dumped" file contains only this user access, which you can change after installation is complete. Users and Passwords are both case sensitive,
INSTALLATION: To install PostNuke, unzip and then upload the unzipped files to your server using your ftp program. Note that when unzipping the files, two folders will probably be created, labeled HTML and PHOENIX.SQL. It is best to first upload the files and folders INSIDE the "HTML" folder (without the folder) to your chosen server directory, and then upload the "phoenix-SQL" folder (with the file in it) into that same directory (note that this is the database "dump" source file used above, and is unnecessary to keep on the server). Make sure that the CONFIG.PHP and CONFIG.OLD files are fresh and unaltered (use the "read" function in an ftp program or Dreamweaver, etc, and look at lines 46 & 47 to make sure no "dbuname" or :dbpass" exists between the ' ' single quotes. ). Set the "config" files' permissions to 666 to make them writable (and be sure to change them back to 644 after installation to prevent hacking).
If you are going to use a database you've created using the Phoenix-file "dump" import technique, note that you must also use the user name and password "sitename_Admin" and "God" in the installation steps below. These are case-sensitive.
To begin the installation, use your web browser to navigate to the directory where you've uploaded your unzipped PostNuke files (ignore error displays). In the address bar, add "install.php" to the web address which appears there (this address should lead to the directory where your PostNuke files are located, eg: http://sitename.com/members/postnuke/install.php). Step through the first steps,which should be self-explanitory. When you come to the form to fill out the database name, user name and password there is one important thing to note. As you probably observed during the step in which you created your database, it appears in cpanel as "sitename_databasename". This is how it must be entered in this form. Both for the Database Username and the Database Name (not for the password). So it should look like: "sitename_Admin", "God" (asterisks), "sitename_NukeDB" (or whatever you named your database). Database Host is most likely "localhost". In the drop-downs the typical installation would be "MySQL" and "MyISAM" for Linux-Apache. On the next dialog choose "New Install" unless you are upgrading (see notes below). On the next dialog, be sure NOT to check the box which says "create database" (you've already done this). Proceed to start the installation, which should present a long list of what the installer has now done, and then on the next dialog present a box where you should now change the Admin password to something else (to prevent hacking).
You should now have a working installation, which you can access directly from a link in the final install dialog. Remember to delete the "install" folder and "install.php" file (top level of the PostNuke installation) to prevent hacking. If you would like to customize the look of the site (called a "theme") one way would be to install the module called "AutoThemes Lite", which can accomplish this by editing regular HTML pages.
If you have a previous, customized PostNuke installation, you can now drag the modules and blocks into their appropriate folders. Note that for each of these you will have to go the the ADMINISTRATION panel in PostNuke and initialize and activate each of them.
Note that it is ok to move the entire directory where you installed PostNuke to another directory on the SAME server for your site, because all of the internal links are relative to PostNuke's own top level directory.
If the above steps either did not work for you, you've lost your admin password, or you don't want to chance losing custom information and database records, there is one PostNuke utility that is worth a try, called "PostNuke Swiss Army Knife" (PSAK). Get this file from the PostNuke site and place it into the top level of your PostNuke installation. Starting it is similar to running the "install.php" script, but instead entering "psak.php". This utility provides several useful functions. It has the ability to generate a new username and encrypted password, which can be pasted into the appropriate lines in your "config.php" file (remember not to use NotePad to edit PHP files, as it may add invisable codes that will wreck the file). Note that if you otherwise manually type plain text into these values, you will also need to change the "encoded" flag value below from "1" to "0".
If you choose to install using the "UPGRADE" option during installation, try these steps: (1) Backup your database (you should really have your entire site backed up to your hard drive). Make sure it includes a copy of the CONFIG.PHP file. (2) Remove ALL of your custom files, and all PostNuke files except for "install.php" and the "install" folder. (3) Copy the "config.php" file back to the top level directory, renaming it "ph7config.php" (be sure to set permissions of this file to 666. (4) Run the installer, selecting "upgrade" in the appropriate dialog and then selecting "PostNuke version 7._" from the list of upgrade "from". (5) Copy all of your custom files, modules, and blocks back to their appropriate directories.
Hope this helps. Peace. -cw
