Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Trouble getting past SilverStripe v2.0 install.php page


Reply


5 Posts   3322 Views

Avatar
Enlightened_One

Community Member, 18 Posts

23 February 2007 at 12:36pm

Edited: 23/02/2007 12:39pm

I have two versions of MySQL running on the same machine
Question 1: I have NOT changed my php.ini to reflect any changes, is this necessary?

I am booting using the --old-passwords to remain compatable with the MySQL4 client with a user named mysql5
$ sudo /var/mysql5/bin/mysqld_safe --old-passwords --user=mysql5 &

I am interested in a liberal policy to get SilverStripe installed before I want to deal with security issues. The following outlines what I have done for a test installation. The following reflects the minimum permission settings required to get me past all the portions of the install.php (except the database details).

I have an OpenBSD machine running
Apache/1.3.29 (Unix) PHP/5.0.4 mod_ssl/2.8.16 OpenSSL/0.9.7g
with MySQL 4.0.24 and MySQL 5.0.27

I have created and altered the /etc/my.cnf file to use port 3666 for MySQL 5 and ensured that the file my.cnf is owned by mysql5
chown mysql5 my.cnf
--------------------
# The MySQL client
port = 3666
socket = /tmp/mysql.sock
# The MySQL server
[mysqld]
old-passwords
port = 3666
socket = /tmp/mysql.sock
---------------------
// I have liberal folder permission settings
//Get a copy of silverstripe-v2.0.0.tar.gz onto your server and extract it
$tar zxvf silverstripe-v2.0.0.tar.gz
//Change the ownership to the username that owns htdocs.
#chown -R username silverstripe-v2.0.0
//Make the folder 'silverstripe-v2.0.0.0' global read /write /execute
#chmod 777 silverstripe-v2.0
//Make the folder 'silverstripe-v2.0.0.0/mysite' global read /write
#chmod 776 silverstripe-v2.0.0.0/mysite
Create a temporary directory named adfadsfdas
# mkdir adfadsfdas
//change ownership to your silverstripe user
# chown username adfadsfdas
//Make the temporary folder global read /write/ execute
# chmod 777 adfadsfdas
//Create a MySQL User and Database

I have created a new MySQL5 root powered user and a database using the following
--------------------
MySQL>GRANT USAGE ON * . * TO 'StripeUSER2'@'localhost' IDENTIFIED BY 'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ;

// give StripeUSER2 access to all databases
mysql> GRANT ALL PRIVILEGES ON *.* TO 'StripeUSER2'@'localhost'
-> IDENTIFIED BY 'passwordheret' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

// redundant give privilege to StripeDATA2 to StripeUSER2
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
-> ON StripeDATA2.*
-> TO 'StripeUSER2'@'localhost'
-> IDENTIFIED BY 'anarchy4breakfast';
Query OK, 0 rows affected (0.01 sec)

mysql>FLUSH PRIVILEGES;
------------------------------------------------------------
// Then with the data entered into install.php for the database as:
MySQL server:localhost:3666
MySQL username:StripeUSER2
MySQL password:password
MySQL database:StripeDATA2

// the following messages appear
Does the server exist   OK (localhost:3666)
Are the access credentials correct
That username/password doesn't work: Access denied for user: 'StripeUSER2@localhost' (Using password: YES)
Can I access/create the database
I can't create new databases and the database 'StripeDATA2' doesn't exist (user 'StripeUSER2' doesn't have CREATE DATABASE permissions.)

Where am I going wrong? Wrong method of accessing non-standard port?
unknown php.ini setting for non-standard port? What am I not seeing?

Avatar
Sigurd

Forum Moderator, 628 Posts

23 February 2007 at 9:33pm

"What am I doing wrong"? Good question, looks like all is being done properly.

Have you confirmed that if you do things like;

mysql -uStripeUSER2 -panarchy4breakfast -P 3666 StripeDATA2;

To test you can get it, and do basic SQL commands?

One other question; you have

MySQL>GRANT USAGE ON * . * TO 'StripeUSER2'@'localhost' IDENTIFIED BY 'password' ....

Then
mysql> GRANT ALL PRIVILEGES ON *.* TO 'StripeUSER2'@'localhost' -> IDENTIFIED BY 'passwordheret' ....

Then
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP -> ON StripeDATA2.* -> TO 'StripeUSER2'@'localhost' -> IDENTIFIED BY 'anarchy4breakfast';

Each time you got a different password being set by IDENTIFIED... I am not sure why this is, but I'm wondering if you just have set the password to something you're not using to connect with in SilverStripe?

Avatar
Enlightened_One

Community Member, 18 Posts

24 February 2007 at 8:51am

Basic connection
$mysql -u StripeUSER2 -p -P 3666
password:anarchy4breakfast

mysql> status;
--------------
mysql Ver 12.22 Distrib 4.0.24, for unknown-openbsd3.8 (i386)

Connection id: 1
Current database:
Current user: StripeUSER2@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Server version: 5.0.33-log
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /tmp/mysql.sock
Uptime: 20 hours 35 min 40 sec

-----------------------

This seems to show the connection client as 4.0.24 and the server as 5.0.33-log

Avatar
Enlightened_One

Community Member, 18 Posts

24 February 2007 at 9:12am

I took your advice and tried to manipulate the StripeDATA2 database and produced a MySQL error. Excellent. I have a new error to chase down... a lead.

mysql> use StripeDATA2;
Database changed
mysql> SHOW TABLES;
ERROR 1018: Can't read dir of './StripeDATA2/' (errno: 13)
mysql> CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),
-> species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
ERROR 1005: Can't create table 'pet' (errno: 13)

Avatar
Sigurd

Forum Moderator, 628 Posts

26 February 2007 at 2:55pm

Cool, looks like you definately have filesystem or MySQL permission problems to figure out before SilverStripe can add tables and do the other things it wants.