Unable to connect to database - WHY??
My prompt in mysql (I issued in mysql "prompt \u \d @\h> " and am looking at a prompt of "concrete5 concrete5 @localhost", and the credentials specified on the page
show the correct host (by name / alias / ip-address etc., every variation tried)
Am I wrong to conclude, given the prompt (above) when I go into mysql via the command line that there is some permissions problem??
In case it helps, I'm using a browser on another PC on the local network, and HAVE set all database permissions for the mysql database (while logged into the PC hosting the C5). All permissions were set BOTH for 'localhost' and '%'... so I'm out of ideas.
Please please... save me hours of frustration, tell me what I'm missing. BTW I'm debugging an experimental install before sending the site into the wild. I'll be tightening up security etc. later, so fear no flames for any suggestions!!
tail -f /var/log/mysql.log &
Unless I totally misread the MySQL docs, granting a 'user'@'%' permissions allows a user with that name to connect from anywhere, but despite going around in circles with different error messages, I decided to run firefox on the DBserver (to persuade it to allow a connection from 'user'@'localhost'
Here's the result from mysql.log ...
6 Connect [email protected] on
6 Init DB concrete
6 Query SET NAMES 'utf8'
6 Query SET CHARACTER SET 'utf8'
6 Query show tables
6 Query show create database `concrete`
The feedback from the C5 web interface is
mysql error: [1044: Access denied for user 'concrete'@'localhost' to database 'concrete'] in EXECUTE("show create database `concrete`")
I've checked that all files are rwx to www-data (in fact the entire structure is now chmod777).
Being new to MySQL, 'EXECUTE("show create...' looks strange to me, and if I'm wrong, I should probably be bugging the MySQL list. I'd very much value your opinion!!
I concluded that the problem was down to DB permissions, but after several searches and forums, concluded the problem was NOT with C5.
I created an apache2 vhost pointing at phpmyadmin, purged out earlier attempts at creating the concrete user, recreated the database and granted all the rights from the phpmyadmin interface. From there, I didn't worry when the C5 content installation didn't respond immediately, as I could see the mysql.log tailing out it's work, eventually it came back reporting it's success.
I had qualms that I could have post-installation DB access problems from a different computer, but no, all is now working like a dream. Thanks again for your help... BTW - the php-mysql module WAS installed...