Installing Apache2 with PHP5 and MySQL Support on Ubuntu 12.04
I have followed your tutorial with this title with some success:
2 - Installing MySQL 5 worked as expected.
3 - Installing Apache2 worked but gave an IP address of 127.0.1.1 instead of 192.168.0.100. When I opened 127.0.0.1 in the browser I got "It works!".
4 - Installing PHP5 worked as expected.
5 - Testing PHP5 worked as expected and I was able to show info.php in the browser.
6 - Getting MySQL Support in PHP5 appeared to work. I didn't run apt-cache search php5, I just selected php5-mysqland php5-gd from the list in the tutorial. I then did Apache2 restart.
7 - phpMyAdmin I ran apt-get install phpmyadmin and answered the two questions correctly, but it did not show in /var/www. I couldn't find it, so I tried to install it again and it told me it was already installed.
I am trying to port my application from 10.04 to 12.04. MySQL with 12.04 took my dump.sql and permissions.sql with no apparent problems. When I opened my application in the browser I had to use 127.0.0.1 as the IP address, and not localhost or 192.168.0.100. When I tried to connect to the database my application returned the following message:
Could not connect to the database.
mysql error number: 1045
mysql error: Access denied for user 'LSStudent'@'localhost' (using password: YES)
The host and user entries in the user table from the mysql database are below:
mysql> select host, user from user;
| host | user |
| % | LSAdmin |
| % | LSAuthor |
| % | LSStudent |
| 127.0.0.1 | root |
| ::1 | root |
| dan-K54C | |
| dan-K54C | root |
| localhost | |
| localhost | debian-sys-maint |
| localhost | root |
Apparently my users are not associated with any host, so cannot be found. How do I find my users, and how do I find phpmyadmin?
Thanks for reading this. I hope you can help.
You probably use a different MySQL password on the new server, so you need to change it in your application's configuration.
My application is working
I appreciate your reply, but with my limited knowledge, I didn't understand what to do. I decided to eliminate anonymous and users with ::1 or % host field. I then re-ran
my permissions.sql script. That seemed to solve the problem. My application is working on localhost.
If Ihave to rebuild my system again I will run your script and, after step 2 - Installing MYSQL 5, I will check the user table in mysql and remove any anonymous users before going to step 3.
|All times are GMT +2. The time now is 18:30.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.