Code:
sudo dpkg -l 'mysql-server*'
[sudo] password for [edited]:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===============-===============-==============================================
ii mysql-server 5.1.58-1ubuntu1 MySQL database server (metapackage depending o
un mysql-server-4. <none> (no description available)
un mysql-server-5. <none> (no description available)
ii mysql-server-5. 5.1.58-1ubuntu1 MySQL database server binaries and system data
un mysql-server-co <none> (no description available)
un mysql-server-co <none> (no description available)
ii mysql-server-co 5.1.58-1ubuntu1 MySQL database server binaries
This command:
Code:
sudo dpkg-reconfigure mysql-server
didn't give any messages in terminal. It simply went back to command prompt.
-------------------------------------------------------------------
I used:
Quote:
sudo dpkg-reconfigure mysql-server-5.1
|
and that allowed me to reset the mysql password.
Then I created mysql by creating a php file:
and edited it:
and inserted this code:
Quote:
<?php
// hostname or ip of server (for local testing, localhost should work)
$dbServer='localhost';
// username and password to log onto db server
$dbUser='root';
$dbPass='[edited]';
// name of database
$dbName='test';
$link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could not connect: ". mysql_error());
print "Connected successfully<br>";
mysql_select_db("$dbName") or die("Could not select database");
print "Database selected successfully<br>";
// close connection
mysql_close($link);
?>
|
then I typed this address in firefox:
and I got this page:
Quote:
Connected successfully
Could not select database
|
I fixed this by creating the database in phpmyadmin. (d-uh!)
Used this to reconfigure phpmyadmin:
Quote:
sudo dpkg-reconfigure phpmyadmin
|
So now all works, except that error:
Quote:
sudo /etc/init.d/apache2 start
* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
|
---------------------------------------------------------
Found it!
Quote:
By default httpd.conf file will be blank. Now, simply add the following line to the file.
ServerName localhost
Save the file and exit vi (or gedit).
Finally restart the server.
$ sudo service apache2 restart
|
from:
http://johnsjavapda.blogspot.com/201...determine.html
Thank you for help, EricTRA and others!!!