Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007 edited
     

    Hi,

    I run a Mac with MAMP. I've done everything as the readme and tutorial.markdown says. I've set up akelos_framework, akelos_framework_dev and akelos_framework_tests databases and have written an xxx_installer.php file. But when I run the ./script/migrate xxx install command I get this error:

    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in 
    /Users/alfner/akelos_framework/vendor/adodb/drivers/adodb-mysql.inc.php on line 349
    Connection to the database failed. mysqlt://root:******@localhost/akelos_framework_dev
    

    Thanks for any advice on this!

    •  
      CommentAuthorbermi
    • CommentTimeNov 17th 2007
     

    It is possible that your MySQL server is not running on port 3306 (MySQL default port) but on MAMPs MySQL port 8889.

    Try to change the port number or try specifying MAMPs socket directly with the option

    'socket' => '/Applications/MAMP/tmp/mysql/mysql.sock'
    
    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007 edited
     
    Valid point, but I acctually got my MAMP MySQL port on the (MySQL) default 3306.
    •  
      CommentAuthorbermi
    • CommentTimeNov 17th 2007
     

    Do you get the same error when using the socket option?

    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007
     

    How do I use the socket option?

    •  
      CommentAuthorbermi
    • CommentTimeNov 17th 2007
     

    By adding the socket option in yout config/config.php file

    $database_settings = array(
        'production' => array(
            'type' => 'mysql', 
            'socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
            'database_name' => 'my_db_name',
            'user' => 'root',
            'password' => '',
            'options' => '',
        ),
        // and all the other environment settings
    );
    
    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007
     

    Ahh, didn't understand where to put it first...

    ...I get the same error though:

    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in
    /Users/alfner/akelos_framework/vendor/adodb/drivers/adodb-mysql.inc.php on line 349
    Connection to the database failed. mysqlt://root:******@localhost/akelos_framework_dev
    
    •  
      CommentAuthorbermi
    • CommentTimeNov 17th 2007
     

    Can you check that

    ls -al /var/mysql/mysql.soc*
    

    points to MAMP socket?

    /var/mysql/mysql.sock -> /Applications/MAMP/tmp/mysql/mysql.sock
    

    Can you connect to the database using...?

    /Applications/MAMP/Library/bin/mysql -uroot -pyourpass  yourdbname
    
    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007 edited
     

    I don't know if I understood you right but when i run:

    AlfredMacBookPro:~/akelos_framework alfner$ ls -al /Applications/MAMP/tmp/mysql/mysql.sock 
    

    I get:

    srwxrwxrwx   1 alfner  admin  0 Nov 16 21:28 /Applications/MAMP/tmp/mysql/mysql.sock
    

    and I can't connect:

    AlfredMacBookPro:~/akelos_framework alfner$ /Applications/MAMP/Library/bin/mysql -root -root akelos_framework_dev
    ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'akelos_framework_dev'
    
    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007
     

    Btw is there a way to reset a specific applications configuration? So that you can step through it again in your web browser?

    •  
      CommentAuthorbermi
    • CommentTimeNov 17th 2007
     

    If you cant access with

    /Applications/MAMP/Library/bin/mysql -uUSERNAME -pPASSWORD  DATABASENAME
    

    there is no way you can access your database via PHP/Akelos unless you provide valid credentials

    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007
     

    Ahh i didn't get the -u and -p part. When i added that I was enable to connect.

    AlfredMacBookPro:~/akelos_framework alfner$ /Applications/MAMP/Library/bin/mysql -uroot -proot akelos_framework_dev
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 109
    Server version: 5.0.41 Source distribution
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql>
    
    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007 edited
     

    I tried to move inside the application folder and run the command but it didn't make any difference:

    AlfredMacBookPro:~/akelos_framework/peakhour alfner$     ./script/migrate Peakhour install
    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in
    /Users/alfner/akelos_framework/vendor/adodb/drivers/adodb-mysql.inc.php on line 349
    Connection to the database failed. mysqlt://root:******@/peakhour_dev?socket=/Applications/MAMP/tmp/mysql/mysql.sock
    

    But it's interesting that it first says "/var/mysql/mysql.sock" and then "/tmp/mysql/mysql.sock". Could that have anything to do with it not working?

    •  
      CommentAuthorbermi
    • CommentTimeNov 17th 2007
     

    Can you connect to the database using other DB's like phpMyAdmin?

    • CommentAuthorprtscr
    • CommentTimeNov 17th 2007
     
    Yes I create the databases with phpMyAdmin
    •  
      CommentAuthorbermi
    • CommentTimeNov 18th 2007
     

    What do you get with

    ls -al /var/mysql/mysql.soc* 
    

    it should be something like

    /var/mysql/mysql.sock -> /Applications/MAMP/tmp/mysql/mysql.sock
    

    BTW are you using a "+" or "@" in your password?

    • CommentAuthorprtscr
    • CommentTimeNov 18th 2007
     

    Nope I don't get that "connection". How do I set that up?

    AlfredMacBookPro:~/akelos_framework/peakhour alfner$ ls -al /var/mysql/mysql.soc* 
    ls: /var/mysql/mysql.soc*: No such file or directory
    

    Nope my password is simply root on my development machine.

    •  
      CommentAuthorbermi
    • CommentTimeNov 18th 2007
     

    Try with

    sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
    
    • CommentAuthorprtscr
    • CommentTimeNov 18th 2007 edited
     

    Hmm, I get an error:

    AlfredMacBookPro:~/akelos_framework/peakhour alfner$ sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
    
    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type "man sudo" for more information.
    
    To proceed, enter your password, or type Ctrl-C to abort.
    
    Password:
    ln: /var/mysql/mysql.sock: No such file or directory'
    

    Do I have to specify further where the /var/ folder is?

    •  
      CommentAuthorbermi
    • CommentTimeNov 18th 2007
     

    /var/mysql/ should already exist in order to add a symlink inside that path

    • CommentAuthorprtscr
    • CommentTimeNov 18th 2007 edited
     

    Cool, now it works! Here's how I did it:

    1. I pressed apple+ctrl+g to be able to go into the /var folder
    2. I created an folder namned /mysql
    3. I created the symlink
    4. And then it worked!

    Thanks a lot for all the help!

    •  
      CommentAuthorthynctank
    • CommentTimeJan 25th 2008
     
    Why does the 'socket' index of the different environment arrays not accomplish the socket setting properly? I have the latest svn checked out, and it respects my port setting (I too am running MAMP) but ignores my 'socket' as suggested by you, bermi, in one of the comments in this thread.

    If I create a symlink all seems to be well, but this shouldn't be necessary. Especially when the symlink dies whenever you kill MAMP.
    • CommentAuthorVBharathi
    • CommentTimeFeb 19th 2008
     
    Hi,
    I am working with winxp. i was download akelos_framework-0.8(2).But i confused how to install this into my system.
    Thanks for any advice on this!
    • CommentAuthorThijs
    • CommentTimeFeb 19th 2008
     

    Maybe this helps ? : http://wiki.akelos.org/booklink-quickstart-on-windows

    • CommentAuthortorkil
    • CommentTimeSep 15th 2008
     
    I just discovered Akelos and it seems very promising, but I must agree with thynctank: It's weird that the socket setting does not set correctly when you install. Kind of disappointing when you are first installing a framework that promises to be extremely easy.
    • CommentAuthortjr88
    • CommentTimeJan 16th 2009
     
    After messing around with this for hours there is a easy fix. In the db config file change local host to 127.0.0.1. Thats it! Make sure you do it for all 3 db conections.
Add your comments
    Username Password
  • Format comments as