I can't comment at the moment, but in simple terms, the main focus here should be to fix the mysql password,
sudo service mysql stop,
run the command
nano password to invoke the nano editor, paste the following text substituting with the new password
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
Then save the file (CTRL-X, save the file), now start mysqld with the created file
sudo mysqld --initfile=`pwd`/password
this will reset the mysql password, you may want to run
sudo killall mysqld; sudo service mysql start
I'd then suggest using https://help.ubuntu.com/community/WordPress in order to install wordpress. It isn't a production ready environment, but will suffice for testing.
carry on if you actually want a "proper" install;
We are now going to start the installing process. I'm going to assume that you're running ubuntu 14.04, and that you have nothing else on your webserver. (earlier versions will probably be the exact same, however replace /var/www/html with /var/www)
sudo -s This will run all commands as root, be wary of what you type!
okay, first we need mod_rewrite, apache2 comes bundled with it, however it is disabled by default!
a2enmod rewrite; service apache2 restart;
cd into the web root folder
tar -vxaf latest.tar.gz
mv wordpress/* ./
We've just downloaded all of the relevant files required, and moved them into the correct place, next let's allow www-data (the user account for the web-server to modify files)
chown -R www-data:www-data ./
Next, let's allow .htaccess files,
and change the
AllowOverride line to read
you should then be able to login to your webserver and setup the wordpress install.